|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.chemistry.quantum.math.util.MathUtils
public final class MathUtils
A collection of few misc. utility math functions. All methods are static and the class cannot be instantiated.
| Method Summary | |
|---|---|
static long |
factorial(int n)
compute N! |
static long |
factorial2(int n)
compute double N! |
static double |
factorialRatioSquared(int a,
int b)
Does ( a! |
static double |
findAngle(Point3D v1,
Point3D v2,
Point3D v3)
Method to find the angle in radians defined by three points v1-v2-v3. |
static double |
findDihedral(Point3D v1,
Point3D v2,
Point3D v3,
Point3D v4)
Method to find the dihedral angle defined by planes v1-v2-v3 and v2-v3-v4. |
static double |
signOf(double value)
Return the sign of (1.0, 0.0, -1.0) of the given value. |
static double |
toDegrees(double radians)
Method to convert radians to degrees |
static double |
toRadians(double degrees)
Method to convert degrees to radians |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static double toDegrees(double radians)
radians - - the value
public static double toRadians(double degrees)
degrees - - the value
public static double signOf(double value)
value - the value of which whose sign we are interested
public static double findAngle(Point3D v1,
Point3D v2,
Point3D v3)
v1, - v2, v3 - the instances of Point3D class
public static double findDihedral(Point3D v1,
Point3D v2,
Point3D v3,
Point3D v4)
v1, - v2, v3, v4 - the instances of Point3D class
public static long factorial(int n)
n - the n, whose factorial is to be found
public static long factorial2(int n)
n - the n, whose factorial is to be found
public static double factorialRatioSquared(int a,
int b)
a - the first termb - the second term
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||