Package io.deephaven.base
Class ClampUtil
java.lang.Object
io.deephaven.base.ClampUtil
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ClampUtil
public ClampUtil()
-
-
Method Details
-
clamp
public static double clamp(double min, double max, double x) - Parameters:
min
-max
-x
-- Returns:
- min, if x<min; max, if x>max; else x
-
clampInt
public static int clampInt(int min, int max, int x) - Parameters:
min
-max
-x
-- Returns:
- min, if x<min; max, if x>max; else x
-
clampLong
public static long clampLong(long min, long max, long x) - Parameters:
min
-max
-x
-- Returns:
- min, if x<min; max, if x>max; else x
-