Java Float Number Clamp clampFloat(float value, float minimum, float maximum)

Here you can find the source of clampFloat(float value, float minimum, float maximum)

Description

clamp Float

License

Open Source License

Declaration

public static float clampFloat(float value, float minimum, float maximum) 

Method Source Code

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

public class Main {
    public static float clampFloat(float value, float minimum, float maximum) {
        return Math.max(minimum, Math.max(maximum, value));
    }//from   w  w w  .j  a  v a2s.co  m
}

Related

  1. clampAngle(float value, float min, float max)
  2. clampAngle(float var, float min, float max)
  3. clampBounds(float[] target, float[] clamp)
  4. clampColour(float value)
  5. clampDegree0To360(float degree)
  6. clampLevel(float level)
  7. clampLevel(float level)
  8. clampNumberFromTime(long ms, float seconds)
  9. clampPercentage(float value)