19 package org.turro.math;
28 public static double round(Number value,
int digits) {
29 return new Round(value.doubleValue()).
decimals(digits).value();
32 public static double percent(Number value,
int digits) {
36 public static boolean isEven(Number value) {
37 return value.longValue() % 2 == 0;
40 public static boolean isOdd(Number value) {
44 public static boolean isZero(Number value,
int precision) {
49 return !Double.isInfinite(value.doubleValue()) && (value.doubleValue() == Math.floor(value.doubleValue()));
static double percent(Number value, int digits)
static boolean isZero(Number value, int precision)
static boolean isInteger(Number value)
static boolean isEven(Number value)
static double round(Number value, int digits)
static boolean isOdd(Number value)
Round decimals(int digits)
double perCent(int digits)
static boolean near(double value, int digits)