18 package org.turro.math;
26 public static boolean orNull(Number value) {
27 return value ==
null || value.longValue() == 0L;
30 public static boolean near(
double value,
int digits) {
31 double range = 1 / Math.pow(10.0, digits);
32 return value < range && value > -range;
35 public static boolean near(Object value,
int digits) {
36 if(value instanceof Number) {
37 return near(((Number) value).doubleValue(), digits);
static boolean orNull(Number value)
static boolean near(double value, int digits)
static boolean near(Object value, int digits)