Here you can find the source of minMax(float... values)
public static float[] minMax(float... values)
//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 }; } }