Package edu.wpi.first.wpiutil.math
Class MathUtil
- java.lang.Object
-
- edu.wpi.first.wpiutil.math.MathUtil
-
public final class MathUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doubleclamp(double value, double low, double high)Returns value clamped between low and high boundaries.static intclamp(int value, int low, int high)Returns value clamped between low and high boundaries.
-
-
-
Method Detail
-
clamp
public static int clamp(int value, int low, int high)Returns value clamped between low and high boundaries.- Parameters:
value- Value to clamp.low- The lower boundary to which to clamp value.high- The higher boundary to which to clamp value.
-
clamp
public static double clamp(double value, double low, double high)Returns value clamped between low and high boundaries.- Parameters:
value- Value to clamp.low- The lower boundary to which to clamp value.high- The higher boundary to which to clamp value.
-
-