Here you can find the source of multiply(float[] array, float factor)
Parameter | Description |
---|---|
array | the array |
factor | the number used for multiplication. |
public static float[] multiply(float[] array, float factor)
//package com.java2s; /*/*from w w w . j a v a2 s.c o m*/ * Copyright (C) 2010-2014 Andreas Maier * CONRAD is developed as an Open Source project under the GNU General Public License (GPL). */ public class Main { /** * Multiplies all entries of array by factor. * @param array the array * @param factor the number used for multiplication. */ public static float[] multiply(float[] array, float factor) { for (int i = 0; i < array.length; i++) { array[i] *= factor; } return array; } /** * Multiplies all entries of the two arrays element by element.<bR> * Works in place and overwrites array. * @param array the array * @param array2 the other array. */ public static void multiply(float[] array, float[] array2) { for (int i = 0; i < array.length; i++) { array[i] *= array2[i]; } } }