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