|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.math.SinCosLUT
public class SinCosLUT
Lookup table for fast sine & cosine computations. The table currently has a fixed precision of 0.25 degrees to which input angles will be rounded to. All methods are static and can be used with both positive and negative input angles.
Field Summary | |
---|---|
static float[] |
cosLUT
LUT for cosine values |
static float |
SC_INV_PREC
calculate reciprocal for conversions |
static int |
SC_PERIOD
compute required table length |
static float |
SC_PRECISION
set table precision to 0.25 degrees |
static float[] |
sinLUT
LUT for sine values |
Constructor Summary | |
---|---|
SinCosLUT()
|
Method Summary | |
---|---|
static float |
cos(float theta)
Calculate cosine for the passed in angle in radians. |
static float |
sin(float theta)
Calculates sine for the passed angle in radians. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float SC_PRECISION
public static final float SC_INV_PREC
public static final int SC_PERIOD
public static final float[] sinLUT
public static final float[] cosLUT
Constructor Detail |
---|
public SinCosLUT()
Method Detail |
---|
public static final float sin(float theta)
theta
-
public static final float cos(float theta)
theta
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |