| Modifier and Type | Field and Description |
|---|---|
| private static final double | |
| private static final int | |
| private static final double |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | |
| public static double | Returns: the clamped valueinput value value, double minimal value min, double maximal value max)Clamp the value into the range [min..max]. |
| public static Rectangle2D | Returns: the resulting rectanglethe given rectangle r, double horizontal value of the additional margin marginX, double vertical value of the additional margin marginY)Return a new rectangle which covers the area of the given rectangle with an additional margin on the sides. |
| public static Rectangle | Returns: the resulting rectanglethe given rectangle r)Create a rectangle with the same area as the given input rectangle but with all of its edges snapped (rounded) to the integer grid. |
| public static int | Returns: resulting floor valuethe argument x)A fast implementation of |
| public static int |
| BIG_ENOUGH_FLOOR | back to summary |
|---|---|
| private static final double BIG_ENOUGH_FLOOR | |
| BIG_ENOUGH_INT | back to summary |
|---|---|
| private static final int BIG_ENOUGH_INT | |
| BIG_ENOUGH_ROUND | back to summary |
|---|---|
| private static final double BIG_ENOUGH_ROUND | |
| Utils | back to summary |
|---|---|
| public Utils() | |
| ceil | back to summary |
|---|---|
| public static int ceil(double x) A fast implementation of
| |
| clamp | back to summary |
|---|---|
| public static double clamp(double value, double min, double max) Clamp the value into the range [min..max].
| |
| dilateRect | back to summary |
|---|---|
| public static Rectangle2D dilateRect(Rectangle2D r, double marginX, double marginY) Return a new rectangle which covers the area of the given rectangle with an additional margin on the sides.
| |
| enlargeRectToGrid | back to summary |
|---|---|
| public static Rectangle enlargeRectToGrid(Rectangle2D r) Create a rectangle with the same area as the given input rectangle but with all of its edges snapped (rounded) to
the integer grid. The resulting rectangle is guaranteed to cover all of the input rectangle's area, so
that
| |
| floor | back to summary |
|---|---|
| public static int floor(double x) A fast implementation of
| |
| round | back to summary |
|---|---|
| public static int round(double x) A fast implementation of
| |