Here you can find the source of divide(double[] a, double v)
Parameter | Description |
---|---|
a | the vector. |
v | the constant. |
public static void divide(double[] a, double v)
//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; } } }