Java Array Max Value findMax(double[] u, int startU, int length)

Here you can find the source of findMax(double[] u, int startU, int length)

Description

find Max

License

Open Source License

Declaration

public static double findMax(double[] u, int startU, int length) 

Method Source Code

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

public class Main {
    public static double findMax(double[] u, int startU, int length) {
        double max = -1;

        int index = startU;
        int stopIndex = startU + length;
        for (; index < stopIndex; index++) {
            double val = u[index];
            val = (val < 0.0D) ? -val : val;
            if (val > max)
                max = val;
        }/*  w  ww  .j  a v a  2s  . c om*/

        return max;
    }
}

Related

  1. arrayMax(final int[] array)
  2. arrayMax(int[] property)
  3. arrayMaximum(int[] array)
  4. findMax(double newNumber, double currentMax)
  5. findMax(double[] arr)
  6. findMax(double[] u, int startU, int length)
  7. findMax(double[] values)
  8. findMax(int a, int b, int c, int d)
  9. findMax(int[] array)