Java Array Min Value min(float... fs)

Here you can find the source of min(float... fs)

Description

min

License

Open Source License

Declaration

public final static float min(float... fs) 

Method Source Code

//package com.java2s;
/*    //from   ww  w  .j  av a 2  s  .c o m
 This file is part of jME Planet Demo.
    
 jME Planet Demo is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation.
    
 jME Planet Demo is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.
    
 You should have received a copy of the GNU General Public License
 along with jME Planet Demo.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    public final static float min(float... fs) {
        float ret = Float.MAX_VALUE;
        for (float f : fs) {
            ret = Math.min(ret, f);
        }
        return ret;
    }
}

Related

  1. min(final int[] values)
  2. min(final long[] array)
  3. min(final Number... numbers)
  4. min(final T... elements)
  5. min(float a[][][])
  6. min(float... values)
  7. min(float... values)
  8. min(float[] array)
  9. min(float[] array, float min)