Java Array Max Value max(final double... doubles)

Here you can find the source of max(final double... doubles)

Description

Maximum of several double

License

Open Source License

Parameter

Parameter Description
doubles Doubles to have the maximum

Return

Maximum of doubles

Declaration

public static final double max(final double... doubles) 

Method Source Code

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

public class Main {
    /**//  w w  w.j a  va2  s  .  c  o  m
     * Maximum of several double
     * 
     * @param doubles
     *           Doubles to have the maximum
     * @return Maximum of doubles
     */
    public static final double max(final double... doubles) {
        double max = doubles[0];

        for (final double real : doubles) {
            max = real > max ? real : max;
        }

        return max;
    }
}

Related

  1. max(double[] values)
  2. max(double[] values)
  3. max(double[] values)
  4. max(double[] x)
  5. max(final double aval, double[] b, final int bi, final int len)
  6. max(final double[] array)
  7. Max(final double[] input)
  8. max(final double[] nums)
  9. max(final double[] tab)