Java Array Divide arrayDivision(double[] array, double number)

Here you can find the source of arrayDivision(double[] array, double number)

Description

A quick method for simple array division in Java.

License

Open Source License

Parameter

Parameter Description

Return

array, the new array

Declaration

public static double[] arrayDivision(double[] array, double number) 

Method Source Code

//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;
    }
}

Related

  1. arrayDivide(double[] a, double[] b)
  2. arrayDivide(double[] d1, double denominator)
  3. div(double a, double[] b)
  4. div(final int[] result, final int[] vector, final int[] scale)
  5. div(float[] items, int offset, int length, float divisor)
  6. div(float[] items, int offset, int length, float divisorX, float divisorY)