Java Array Multiply multiply(double[] a, double m)

Here you can find the source of multiply(double[] a, double m)

Description

Multiply each element in the given array by the given factor.

License

Open Source License

Declaration

public static double[] multiply(double[] a, double m) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//ww  w . j a v  a  2 s . co  m
     * Multiply each element in the given array by the given factor. The original array is returned with altered values.
     */
    public static double[] multiply(double[] a, double m) {
        for (int i = 0; i < a.length; i++) {
            a[i] *= m;
        }
        return a;
    }
}

Related

  1. mult(double[][] A, double[][] B)
  2. mult(float[] nums, float n)
  3. mult(float[] nums, float n)
  4. multiply(byte[] a, byte b)
  5. multiply(double factor, double[] vector)
  6. multiply(double[] a, double v)
  7. multiply(double[] a, double[] b)
  8. multiply(double[] a, double[] b)
  9. multiply(double[] a, double[] b)