Java Number Min Value min(float value1, float value2)

Here you can find the source of min(float value1, float value2)

Description

Returns the lesser of two values.

License

Open Source License

Parameter

Parameter Description
value1 Source value.
value2 Source value.

Return

The lesser value.

Declaration

public static float min(float value1, float value2) 

Method Source Code

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

public class Main {
    /**/*from ww w .  j a  v  a 2  s  . co  m*/
     * Returns the lesser of two values.
     * 
     * @param value1
     *        Source value.
     * @param value2
     *        Source value.
     * @return The lesser value.
     */
    public static float min(float value1, float value2) {
        return Math.min(value1, value2);
    }

    /**
     * Returns the lesser of two values.
     * 
     * @param value1
     *        Source value.
     * @param value2
     *        Source value.
     * @return The lesser value.
     */
    public static int min(int value1, int value2) {
        return value1 < value2 ? value1 : value2;
    }
}

Related

  1. min(final String string1, final String string2)
  2. min(float a, float b)
  3. min(float a, float b)
  4. min(float a, float b, float c, float d, float e)
  5. min(float dirOffset, float min, float max)
  6. min(float value1, float value2)
  7. min(float x0, float x1)
  8. min(int a, int b)
  9. min(int a, int b)