Fast trigonometry functions using cache table and precalculated data.
Based on Michael Kraus implementation.
public static function cos(radians:Number):Number
Returns the cosine of a given value, by looking up it's approximation in a
precomputed table.
Parameters
| radians:Number — The value to cosine.
|
Returns
| Number — The approximation of the value's cosine.
|
public static function sin(radians:Number):Number
Returns the sine of a given value, by looking up it's approximation in a
precomputed table.
Parameters
| radians:Number — The value to sine.
|
Returns
| Number — The approximation of the value's sine.
|
public static function tan(radians:Number):Number
Returns the tangent of a given value, by looking up it's approximation in a
precomputed table.
Parameters
| radians:Number — The value to tan.
|
Returns
| Number — The approximation of the value's tangent.
|
public static const HALF_PI:Number
public static const initialized:Boolean
public static const PRECISION:int = 0x020000 Precission. The bigger, the more entries in lookup table so the more accurate results.
public static const PRECISION_DIV_2PI:Number
public static const PRECISION_S:int = 131071.0
public static const TWO_PI:Number
ASDoc: Preliminary documentation for the Sandy 3D Engine, version 3.0.1