Java Array Max Value maxDblArrayValue(int npts, double[] dbls)

Here you can find the source of maxDblArrayValue(int npts, double[] dbls)

Description

Returns max value of an array of doubles.

License

Open Source License

Declaration

public static double maxDblArrayValue(int npts, double[] dbls) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  ww  w  .  jav a2 s .co  m*/
     * Returns max value of an array of doubles.
     */
    public static double maxDblArrayValue(int npts, double[] dbls) {
        if (npts == 0)
            return 0.0;

        double max = dbls[0];
        for (int i = 1; i < npts; i++)
            max = Math.max(max, dbls[i]);

        return max;
    }
}

Related

  1. maxBetween(int[] arr1, int[] arr2)
  2. maxbits(int[] i, int pos, int length)
  3. maxbits32(int[] i, int pos)
  4. maxCommonLeadingWhitespaceForAll(String[] strings)
  5. maxcount(int[] vals, int max, int maxcount)
  6. maxdex(float... values)
  7. maxdiffbits(int initoffset, int[] i, int pos, int length)
  8. maxDiffLocation(double[] list1, double[] list2)
  9. maxDistance(byte[] array, int maxDistance)