public final class MathUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
abs(int pNumber)
A replacement for
Math.abs, that never returns negative values. |
static long |
abs(long pNumber)
A replacement for
Math.abs, that never returns negative values. |
static double |
ln(double pArg)
Returns the natural logarithm (base e) of a double value.
|
static double |
log(double pArg)
Returns the base 10 logarithm of a double value.
|
static double |
log(double pArg,
double pBase)
Returns the base N logarithm of a double value, for a given base
N.
|
static double |
log2(double pArg)
Returns the base 2 logarithm of a double value.
|
public static double ln(double pArg)
java.lang.Math.log, just with a proper name.pArg - a number greater than 0.0.pArg, the natural logarithm of
pArg.Math.log(double)public static double log(double pArg)
pArg - a number greater than 0.0.pArg, the base 10 logarithm of
pArg.public static double log2(double pArg)
pArg - a number greater than 0.0.pArg, the base 2
logarithm of pArg.public static double log(double pArg,
double pBase)
pArg - a number greater than 0.0.pBase - a number greater than 0.0.pArg, the base
pBase logarithm of pArg.public static long abs(long pNumber)
Math.abs, that never returns negative values.
Math.abs(long) does this for Long.MIN_VALUE.pNumber - a numberpNumberArithmeticException - if pNumber == Long.MIN_VALUEMath.abs(long),
Long.MIN_VALUEpublic static int abs(int pNumber)
Math.abs, that never returns negative values.
Math.abs(int) does this for Integer.MIN_VALUE.pNumber - a numberpNumberArithmeticException - if pNumber == Integer.MIN_VALUEMath.abs(int),
Integer.MIN_VALUECopyright © 2014. All Rights Reserved.