Here you can find the source of arrayDivision(double[] array, double number)
Parameter | Description |
---|
public static double[] arrayDivision(double[] array, double number)
//package com.java2s; //License from project: Open Source License public class Main { /**/*w w w . j a v a2s .com*/ * A quick method for simple array division in Java. It returns a newn array * @param array, the array to be divided * @param number, the number to divide the array with * @return array, the new array */ public static double[] arrayDivision(double[] array, double number) { double[] newArray = new double[array.length]; for (int i = 0; i < array.length; i++) { newArray[i] = array[i] / number; } return newArray; } }