| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static double | Returns: value ceiled with scaleThe value that needs to be ceiled value, double The scale that will be used scale)The value is ceiled with a given scale using Math.ceil. |
| public static double | Returns: value floored with scaleThe value that needs to be floored value, double The scale that will be used scale)The value is floored for a given scale using Math.floor. |
| public static double | Returns: value rounded with scaleThe value that needs to be rounded value, double The scale that will be used scale)The value is rounded with a given scale using |
| public static double | Returns: value rounded with scaleThe value that needs to be rounded value, double The scale that will be used scale)
Deprecated
uses
Math#round(double) instead of Math#rint(double), don't use in new code, use rint(double, double)
The value is rounded with a given scale using |
| ScaledMath | back to summary |
|---|---|
| public ScaledMath() | |
| ceil | back to summary |
|---|---|
| public static double ceil(double value, double scale) The value is ceiled with a given scale using Math.ceil. When the absolute value of the given value multiplied by the current scale is less than 10^15, then this method guarantees that: scaledCeil(scaledCeil(value, scale), scale) == scaledCeil(value, scale)The limit is about 10^15 because double values will no longer be able to represent larger integers with exact precision beyond this limit.
| |
| floor | back to summary |
|---|---|
| public static double floor(double value, double scale) The value is floored for a given scale using Math.floor. When the absolute value of the given value multiplied by the current scale is less than 10^15, then this method guarantees that: scaledFloor(scaledFloor(value, scale), scale) == scaledFloor(value, scale)The limit is about 10^15 because double values will no longer be able to represent larger integers with exact precision beyond this limit.
| |
| rint | back to summary |
|---|---|
| public static double rint(double value, double scale) The value is rounded with a given scale using
| |
| round | back to summary |
|---|---|
| public static double round(double value, double scale)
Deprecated uses The value is rounded with a given scale using
| |