Java Float Number Clamp clampColour(float value)

Here you can find the source of clampColour(float value)

Description

clamp Colour

License

Open Source License

Declaration

public static float clampColour(float value) 

Method Source Code

//package com.java2s;
//License from project: MIT License 

public class Main {
    public static float clampColour(float value) {
        return clampFloat(value, 0.0f, 1.0f);
    }/*from   ww  w .  j av  a 2s. com*/

    public static float clampFloat(float value, float minimum, float maximum) {
        return Math.max(minimum, Math.max(maximum, value));
    }
}

Related

  1. clamp360(float dir)
  2. clamp_float(float p_76131_0_, float p_76131_1_, float p_76131_2_)
  3. clampAngle(float value, float min, float max)
  4. clampAngle(float var, float min, float max)
  5. clampBounds(float[] target, float[] clamp)
  6. clampDegree0To360(float degree)
  7. clampFloat(float value, float minimum, float maximum)
  8. clampLevel(float level)
  9. clampLevel(float level)