gov.nasa.alsUtility
Class MathUtility
java.lang.Object
gov.nasa.alsUtility.MathUtility
- public class MathUtility
- extends java.lang.Object
Method Summary |
static Vector3d[] |
closestLineSegmentPoints(Vector3d a1,
Vector3d a2,
Vector3d b1,
Vector3d b2)
|
static double |
distance(Vector3d a,
Vector3d b)
|
static double |
distanceBetweenLineSegments(Vector3d a1,
Vector3d a2,
Vector3d b1,
Vector3d b2)
|
static double |
getQuadraticExtremumX(double[] abc)
|
static double[] |
getQuadraticFactors(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
|
protected static Vector3d[] |
makeArray(Vector3d a,
Vector3d b)
|
static Vector3d |
minus(Vector3d result,
Vector3d first,
Vector3d second)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MathUtility
public MathUtility()
getQuadraticFactors
public static double[] getQuadraticFactors(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
throws java.lang.ArithmeticException
- Returns:
- a, b, c in ax^2 + bx + c = y given three sets of x,y
- Throws:
java.lang.ArithmeticException
getQuadraticExtremumX
public static double getQuadraticExtremumX(double[] abc)
throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
distance
public static double distance(Vector3d a,
Vector3d b)
minus
public static Vector3d minus(Vector3d result,
Vector3d first,
Vector3d second)
makeArray
protected static Vector3d[] makeArray(Vector3d a,
Vector3d b)
distanceBetweenLineSegments
public static double distanceBetweenLineSegments(Vector3d a1,
Vector3d a2,
Vector3d b1,
Vector3d b2)
closestLineSegmentPoints
public static Vector3d[] closestLineSegmentPoints(Vector3d a1,
Vector3d a2,
Vector3d b1,
Vector3d b2)