public final class Tools extends Object
| Constructor and Description |
|---|
Tools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
debugBreak(Object o) |
static boolean |
epsilonEquals(double a,
double b)
Tests if two double values are approximately equal
|
static boolean |
epsilonEquals(double a,
double b,
double tolerance)
Tests if two double values are approximately equal,
up to a given tolerance
|
static int |
hashCode(double d)
Hashcode for a double primitive
|
static int |
hashCode(int value)
Hashcode for an int, defined as the value of the int itself for consistency with java.lang.Integer
|
static int |
hashCode(long l)
Hashcode for a long primitive
|
static double |
toDouble(Double d)
Convenience overload to convert a Double to a primitive double
|
static double |
toDouble(Number d)
Convenience overload to convert a Number to a primitive double
|
static double |
toDouble(Object object)
Converts an numerical object to a primitive double
Handles numbers and scalars
|
public static void debugBreak(Object o)
public static int hashCode(int value)
value - public static int hashCode(double d)
d - public static int hashCode(long l)
l - public static double toDouble(Object object)
public static double toDouble(Double d)
public static double toDouble(Number d)
public static boolean epsilonEquals(double a,
double b)
a - b - public static boolean epsilonEquals(double a,
double b,
double tolerance)
Copyright © 2013. All Rights Reserved.