Java Float Number Clip clipFloat(float value, float min, float max)

Here you can find the source of clipFloat(float value, float min, float max)

Description

clip Float

License

Open Source License

Declaration

public static float clipFloat(float value, float min, float max) 

Method Source Code

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

public class Main {
    public static float clipFloat(float value, float min, float max) {
        if (value > max)
            value = max;/* w  w  w. j a va 2  s  . c  o  m*/
        if (value < min)
            value = min;
        return value;
    }
}

Related

  1. clip(float f, float lo, float hi)
  2. clip(float value, float bottom, float top)
  3. clip(float x)
  4. clipf(float num, float mini, float maxi)
  5. clipNormalized(final float a)
  6. clipToRange(float[][] in, float min, float max)