|
static double | round (Number value, int digits) |
|
static double | percent (Number value, int digits) |
|
static boolean | isEven (Number value) |
|
static boolean | isOdd (Number value) |
|
static boolean | isZero (Number value, int precision) |
|
static boolean | isInteger (Number value) |
|
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 26 of file NumberUtils.java.
◆ isEven()
static boolean org.turro.math.NumberUtils.isEven |
( |
Number |
value | ) |
|
|
static |
◆ isInteger()
static boolean org.turro.math.NumberUtils.isInteger |
( |
Number |
value | ) |
|
|
static |
Definition at line 48 of file NumberUtils.java.
49 return !Double.isInfinite(value.doubleValue()) && (value.doubleValue() == Math.floor(value.doubleValue()));
◆ isOdd()
static boolean org.turro.math.NumberUtils.isOdd |
( |
Number |
value | ) |
|
|
static |
◆ isZero()
static boolean org.turro.math.NumberUtils.isZero |
( |
Number |
value, |
|
|
int |
precision |
|
) |
| |
|
static |
◆ percent()
static double org.turro.math.NumberUtils.percent |
( |
Number |
value, |
|
|
int |
digits |
|
) |
| |
|
static |
Definition at line 32 of file NumberUtils.java.
33 return new Round(value.doubleValue()).perCent(digits);
◆ round()
static double org.turro.math.NumberUtils.round |
( |
Number |
value, |
|
|
int |
digits |
|
) |
| |
|
static |
Definition at line 28 of file NumberUtils.java.
29 return new Round(value.doubleValue()).decimals(digits).value();
The documentation for this class was generated from the following file: