Java Array Min Value minMax(float... values)

Here you can find the source of minMax(float... values)

Description

min Max

License

Apache License

Return

this min and max value of a float array

Declaration

public static float[] minMax(float... values) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /** @return this min and max value of a float array **/
    public static float[] minMax(float... values) {
        float min = 0;
        float max = 0;
        for (float value : values) {
            if (value < min)
                min = value;/* w w w  .  j  a v  a  2s .c om*/
            else if (value > max)
                max = value;
        }
        return new float[] { min, max };
    }
}

Related

  1. minkowskiDistance(double[] coord1, double[] coord2)
  2. minLengthCheck(final byte[] buffer, final byte length)
  3. minList(int[] listA, int[] listB)
  4. minLocation(double[] list)
  5. minmax(double[] a)
  6. minMax(float[] array)
  7. minmax(int[] values)
  8. minMax(int[] values)
  9. minmax(String args[], boolean minimum)