Java Float Number Clamp clamp_float(float p_76131_0_, float p_76131_1_, float p_76131_2_)

Here you can find the source of clamp_float(float p_76131_0_, float p_76131_1_, float p_76131_2_)

Description

Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and third parameters

License

Open Source License

Declaration

public static float clamp_float(float p_76131_0_, float p_76131_1_, float p_76131_2_) 

Method Source Code

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

public class Main {
    /**/*from ww  w  . ja v  a2s. com*/
     * Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and
     * third parameters
     */
    public static float clamp_float(float p_76131_0_, float p_76131_1_, float p_76131_2_) {
        return p_76131_0_ < p_76131_1_ ? p_76131_1_ : (p_76131_0_ > p_76131_2_ ? p_76131_2_ : p_76131_0_);
    }
}

Related

  1. clamp(float x, float a, float b)
  2. clamp(float x, float y, float z)
  3. clamp180(float r1, float r2)
  4. clamp1f(float f)
  5. clamp360(float dir)
  6. clampAngle(float value, float min, float max)
  7. clampAngle(float var, float min, float max)
  8. clampBounds(float[] target, float[] clamp)
  9. clampColour(float value)