|
mhuss utils 1.1.5ws | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mhuss.AstroLib.MathOps
public class MathOps
MathOps contains some useful trig, vector and matrix operations.
Based on C code by Bill Gray (www.projectpluto.com)
| Field Summary | |
|---|---|
static int |
VECTOR_SIZE
|
| Constructor Summary | |
|---|---|
MathOps()
|
|
| Method Summary | |
|---|---|
static double |
acose(double arg)
Calculates the arc cosine, but limits the input to the range ( -1.0 < rad < +1.0 ). |
static double |
asine(double arg)
Calculates the arc sine, but limits the input to the range ( -1.0 < rad < +1.0 ). |
static void |
cartesianToPolar(double[] cartVect,
double[] polarCoord)
|
static void |
polarToCartesian(double[] vectC,
double[] vectP)
Convert polar coordinates with radius to Cartesian coordinates added by w. |
static void |
polarToCartesian(double[] vect,
double lon,
double lat,
double radius)
Convert polar coordinates with radius to Cartesian coordinates added by w. |
static void |
rotateVector(double[] v,
double angle,
int axis)
Rotate a vector along the specified axis. |
static void |
setIdentityMatrix(double[] matrix)
Initializes a matrix to base (identity) values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VECTOR_SIZE
| Constructor Detail |
|---|
public MathOps()
| Method Detail |
|---|
public static double acose(double arg)
arg - The angle in radians
public static double asine(double arg)
arg - The angle in radians
public static void setIdentityMatrix(double[] matrix)
matrix - The matrix to initialize
public static void rotateVector(double[] v,
double angle,
int axis)
v - The vector to rotateangle - The angle to useaxis - The axis along which to rotate
public static void polarToCartesian(double[] vect,
double lon,
double lat,
double radius)
vect - Vector to hold the Cartesian coordinateslon - Polar longitudelat - Polar latitude
public static void polarToCartesian(double[] vectC,
double[] vectP)
vectC - Vector to hold the Cartesian coordinatesvectP - Vector to hold the Polar coordinates
public static void cartesianToPolar(double[] cartVect,
double[] polarCoord)
|
mhuss utils 1.1.5ws | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||