Java Number Max Value max(float value1, float value2)

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

Description

Returns the greater of two values.

License

Open Source License

Parameter

Parameter Description
value1 Source value.
value2 Source value.

Return

The greater value.

Declaration

public static float max(float value1, float value2) 

Method Source Code

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

public class Main {
    /**//  www.j a  v  a 2 s .com
     * Returns the greater of two values.
     * 
     * @param value1
     *        Source value.
     * @param value2
     *        Source value.
     * @return The greater value.
     */
    public static float max(float value1, float value2) {
        return Math.max(value1, value2);
    }

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

Related

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