FastMath Class Reference
[Math]
Static class for math function with increased speed, but reduced accuracy.
More...
#include <Math.h>
List of all members.
Public Member Functions |
bool | IsPrime (const int n) |
int | NextPrime (const int n) |
Static Public Member Functions |
static float32 | Sqrt (float32 x) |
static float64 | Sqrt (float64 x) |
static float64 | Deg2rad (float64 deg) |
static float64 | Rad2deg (float64 rad) |
static float64 | Sin (float64 angle) |
static float64 | Cos (float64 angle) |
static float64 | Pythagoras (float64 a, float64 b) |
static int | Pythagoras (int a, int b) |
static int | Crop (int num, int min, int max) |
static float64 | Crop (float64 num, float64 min, float64 max) |
static bool | InRange (int num, int min, int max) |
static void | ClearBuffer (int *buffer, int size, int value) |
static void | CropBuffer (int *buffer, int size, int min, int max) |
static void | CopyBuffer (int *source, int size, int *target) |
static float64 | Random () |
static float64 | Random (float64 min, float64 max) |
static float64 | RandomWithDelta (float64 averidge, float64 delta) |
static int | FastRandom (int bits) |
static int | FastRndBit () |
static float64 | Interpolate (float64 a, float64 b, float64 d) |
Static Protected Member Functions |
static float32 | InvSqrt (float32 x) |
static void | BuildTrig () |
Static Protected Attributes |
static float64 | m_sinus [4096] |
static float64 | m_cosinus [4096] |
static bool | m_trig = false |
static float64 | m_pi |
static float64 | m_rad2scale = 4096.0 / Math::PI() / 2.0 |
static float64 | m_pad = 256 * Math::PI() |
static int | m_fastRandoms [32] |
static int | m_fastRndPointer = 0 |
static bool | m_fastRndInit = false |
Detailed Description
Static class for math function with increased speed, but reduced accuracy.
Definition at line 220 of file Math.h.
The documentation for this class was generated from the following files: