public class MathUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
clamp(double min,
double max,
double value)
Constrains the value between the given borders (inclusive).
|
public static double clamp(double min,
double max,
double value)
min - The minimum value.max - The maximum value.value - The value to constrain within min and maxvalue if within min and max, otherwise one of min and max.Copyright © 2016. All rights reserved.