Java Float Number Clip clip(float f, float lo, float hi)

Here you can find the source of clip(float f, float lo, float hi)

Description

clip

License

Open Source License

Declaration

public static float clip(float f, float lo, float hi) 

Method Source Code

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

public class Main {
    public static float clip(float f, float lo, float hi) {
        if (f < lo)
            return lo;
        if (f > hi)
            return hi;
        return f;
    }/*from  w  w w  .  j av a  2 s.  c om*/
}

Related

  1. clip(float value, float bottom, float top)
  2. clip(float x)
  3. clipf(float num, float mini, float maxi)
  4. clipFloat(float value, float min, float max)