|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsubscript.math.MathUtil
public class MathUtil
Miscellaneous math utilities like mod2pi and fast exp functions.
Constructor Summary | |
---|---|
MathUtil()
|
Method Summary | |
---|---|
static double |
atan(double x)
returns [-PI/2, PI/2] accurate within 0.269 degrees |
static double |
atan2(double y,
double x)
|
static void |
benchatan()
|
static void |
benchexp()
|
static double |
clamp(double v,
double min,
double max)
|
static int |
clamp(int v,
int min,
int max)
|
static boolean |
doubleEquals(double a,
double b)
Returns true if the two doubles are within a small epsilon of each other. |
static double |
exp(double xin)
Quickly compute e^x for all x. |
static void |
inverse22(Matrix A)
|
static void |
inverse33(Matrix A)
|
static void |
main(java.lang.String[] args)
|
static double |
mod2pi(double vin)
Ensure that v is [-PI, PI] |
static double |
mod2pi(double ref,
double v)
Returns a value of v wrapped such that ref and v differ by no more +/-PI |
static double |
square(double x)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MathUtil()
Method Detail |
---|
public static double mod2pi(double vin)
public static double mod2pi(double ref, double v)
public static boolean doubleEquals(double a, double b)
public static int clamp(int v, int min, int max)
public static double clamp(double v, double min, double max)
public static final double square(double x)
public static final double exp(double xin)
public static final double atan2(double y, double x)
public static final double atan(double x)
public static void main(java.lang.String[] args)
public static void benchexp()
public static void benchatan()
public static void inverse22(Matrix A)
public static void inverse33(Matrix A)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |