Java Array Max Value max(float... fs)

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

Description

max

License

Open Source License

Declaration

public static float max(float... fs) 

Method Source Code

//package com.java2s;

public class Main {
    public static float max(float... fs) {
        float max = 0;
        if (fs.length > 0) {
            max = fs[0];//  w w w .j a  v a2s  .  c  o m
            for (float f : fs) {
                if (f > max) {
                    max = f;
                }
            }
        }
        return max;
    }

    public static double max(double... ds) {
        double max = 0;
        if (ds.length > 0) {
            max = ds[0];
            for (double d : ds) {
                if (d > max) {
                    max = d;
                }
            }
        }
        return max;
    }
}

Related

  1. max(final long[] longs)
  2. max(final Number... numbers)
  3. max(final T p_enum1, final T p_enum2, final T[] enumValues)
  4. max(final T... elements)
  5. max(float... a)
  6. max(float... fs)
  7. max(float... values)
  8. max(float[] floats)
  9. max(float[] in, int[] idx)