|
static boolean | orNull (Number value) |
|
static boolean | near (double value, int digits) |
|
static boolean | near (Object value, int digits) |
|
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 24 of file Zero.java.
◆ near() [1/2]
static boolean org.turro.math.Zero.near |
( |
double |
value, |
|
|
int |
digits |
|
) |
| |
|
static |
Definition at line 30 of file Zero.java.
31 double range = 1 / Math.pow(10.0, digits);
32 return value < range && value > -range;
◆ near() [2/2]
static boolean org.turro.math.Zero.near |
( |
Object |
value, |
|
|
int |
digits |
|
) |
| |
|
static |
Definition at line 35 of file Zero.java.
36 if(value instanceof Number) {
37 return near(((Number) value).doubleValue(), digits);
static boolean near(double value, int digits)
◆ orNull()
static boolean org.turro.math.Zero.orNull |
( |
Number |
value | ) |
|
|
static |
Definition at line 26 of file Zero.java.
27 return value ==
null || value.longValue() == 0L;
The documentation for this class was generated from the following file: