|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object diamondedge.util.MoreMath
public class MoreMath
Constructor Summary | |
---|---|
MoreMath()
|
Method Summary | |
---|---|
static double |
acosh(double x)
Returns the inverse hyperbolic cosine of a number. |
static double |
asinh(double x)
Returns the inverse hyperbolic sine of a number. |
static double |
atanh(double x)
Returns the inverse hyperbolic tangent of a number. |
static double |
ceil(double n,
double sig)
Returns number rounded up, away from zero, to the nearest multiple of significance. |
static int |
combinations(int n,
int groupSize)
Returns the total possible number of groups for a given number of items. |
static double |
cosh(double x)
Returns the hyperbolic cosine of a number. |
static double |
even(double n)
Returns number rounded up to the nearest even integer. |
static int |
factorial(int n)
Returns the factorial of a number. |
static double |
floor(double n,
double sig)
Rounds number down, toward zero, to the nearest multiple of significance. |
static double |
log(double x,
double base)
Returns the logarithm of a number to the specified base. |
static double |
log10(double x)
Returns the base-10 logarithm of a number. |
static int |
mod(int n,
int divisor)
Returns the remainder after number is divided by divisor. |
static double |
odd(double n)
Returns number rounded up to the nearest odd integer. |
static int |
permutations(int n,
int groupSize)
Returns the total possible number of order dependent arrangements for a given number of items. |
static int |
quotient(int n,
int divisor)
Returns the remainder after number is divided by divisor. |
static int |
random(int n1,
int n2)
Returns a random number between the numbers you specify. |
static double |
round(double n,
double digits)
Rounds a number to a specified number of digits. |
static double |
roundDown(double n,
double digits)
Rounds a number down (toward zero). |
static double |
roundUp(double n,
double digits)
Rounds a number up (away from zero). |
static int |
sign(double n)
Returns an integer indicating the sign of a number. |
static double |
sinh(double x)
Returns the hyperbolic sine of a number. |
static double |
tanh(double x)
Returns the hyperbolic tangent of a number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoreMath()
Method Detail |
---|
public static double log(double x, double base)
public static double log10(double x)
public static double acosh(double x)
public static double asinh(double x)
public static double atanh(double x)
public static double cosh(double x)
public static double sinh(double x)
public static double tanh(double x)
public static int factorial(int n)
public static int permutations(int n, int groupSize)
n
- total number of itemsgroupSize
- number of items in each group
example p(4,3) = 24public static int combinations(int n, int groupSize)
n
- total number of itemsgroupSize
- number of items in each group
example c(6,4) = 15public static int mod(int n, int divisor)
public static int quotient(int n, int divisor)
public static int random(int n1, int n2)
n1
- smallest integer random will returnn2
- largest integer random will returnpublic static double ceil(double n, double sig)
n
- is the number you want to round.sig
- is the multiple to which you want to round.public static double floor(double n, double sig)
n
- is the number you want to round.sig
- is the multiple to which you want to round.public static double round(double n, double digits)
n
- is the number you want to round.digits
- specifies the number of digits to which you want to round number. public static double roundUp(double n, double digits)
n
- is the number you want to round.digits
- specifies the number of digits to which you want to round number. public static double roundDown(double n, double digits)
n
- is the number you want to round.digits
- specifies the number of digits to which you want to round number. public static double odd(double n)
n
- is the number you want to round.public static double even(double n)
n
- is the number you want to round.public static int sign(double n)
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |