Java Array Divide divide(double[] numerator, double[] denominator)

Here you can find the source of divide(double[] numerator, double[] denominator)

Description

This method divides each component in the numerator by its corresponding component in the denominator.

License

Open Source License

Parameter

Parameter Description
numerator a parameter
denominator a parameter

Declaration

public static double[] divide(double[] numerator, double[] denominator) 

Method Source Code

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

public class Main {
    /**/*from   w w w  .  ja  v  a  2 s .  c  o  m*/
     * This method divides each component in the numerator by its corresponding
     * component in the denominator.  It is assumed that numerator and denominator
     * are the same size. The quotient is returned in a new array.
     * @param numerator
     * @param denominator
     * @return
     */
    public static double[] divide(double[] numerator, double[] denominator) {
        double[] quotient = new double[numerator.length];
        for (int i = 0; i < numerator.length; ++i)
            quotient[i] = numerator[i] / denominator[i];
        return quotient;
    }
}

Related

  1. divide(double[] a, double v)
  2. divide(double[] a, double[] b)
  3. divide(double[] array, double divisor)
  4. divide(double[] array, double value)
  5. divide(double[] dividend, double[] divisor, double dividendAdjustment, double divisorAdjustment)
  6. divide(double[] t1, double[] t2)
  7. divide(double[][] arr1, double[][] arr2)
  8. divide(double[][] numerator, double[][] denominator)
  9. divide(final double[] numerators, final double[] denominators)