Java Array Divide divide(double[] a, double v)

Here you can find the source of divide(double[] a, double v)

Description

Divides a constant to all elements in the array.

License

Apache License

Parameter

Parameter Description
a the vector.
v the constant.

Declaration

public static void divide(double[] a, double v) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from ww w.ja  v  a  2 s .c  om
     * Divides a constant to all elements in the array.
     * 
     * @param a the vector.
     * @param v the constant.
     */
    public static void divide(double[] a, double v) {
        for (int i = 0; i < a.length; i++) {
            a[i] /= v;
        }
    }
}

Related

  1. div(float[] values, float divisor)
  2. div(int[]... vectors)
  3. div(String[] X)
  4. div_one(double[][] A)
  5. divide(double[] a, double sum)
  6. divide(double[] a, double[] b)
  7. divide(double[] array, double divisor)
  8. divide(double[] array, double value)
  9. divide(double[] dividend, double[] divisor, double dividendAdjustment, double divisorAdjustment)