Java Array Cross Product crossMult(int value, int maximum, int coefficient)

Here you can find the source of crossMult(int value, int maximum, int coefficient)

Description

Do a cross multiplication

License

Open Source License

Parameter

Parameter Description
value The value
maximum The maximum value
coefficient The coefficient

Return

The result

Declaration

public static int crossMult(int value, int maximum, int coefficient) 

Method Source Code

//package com.java2s;
/*/*from w w w.j  ava 2  s .  c o  m*/
 * Copyright ? 2016 Cl?ment "w67clement" Wagner
 *
 * This file is part of OpenW67Render.
 *
 * OpenW67Render is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * OpenW67Render is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with OpenW67Render.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    /**
     * Do a cross multiplication
     *
     * @param value       The value
     * @param maximum     The maximum value
     * @param coefficient The coefficient
     *
     * @return The result
     */
    public static int crossMult(int value, int maximum, int coefficient) {
        return (int) ((double) value / (double) maximum * (double) coefficient);
    }
}

Related

  1. cross2D(int[] v, int[] u)
  2. cross3(double x1, double y1, double z1, double x2, double y2, double z2)
  3. cross33(float u[], float v[])
  4. crossEndForLineVectorAlgebra(double x1, double y1, double x2, double y2, double margin, double width)
  5. crossMuliply(double a, double b, double c)
  6. crossProduct(double x1, double y1, double x2, double y2, double x3, double y3)
  7. crossProduct(double[] output, double[] a, double[] b)
  8. CrossProduct(final double[] vect1, final double[] vect2)
  9. crossProduct(int ax, int ay, int bx, int by, int cx, int cy)