|
OpenEnroth 39d87c6
|
#include <TrigLut.h>
Public Member Functions | |
| TrigTableLookup () | |
| float | cos (int angle) const |
| float | sin (int angle) const |
| int | atan2 (int x, int y) const |
Static Public Attributes | |
| static const int | uIntegerPi = 1024 |
| static const int | uIntegerHalfPi = 512 |
| static const int | uIntegerQuarterPi = 256 |
| static const int | uIntegerDoublePi = 2048 |
| static const int | uDoublePiMask = 2047 |
| static const int | uPiMask = 1023 |
| static const int | uHalfPiMask = 511 |
Private Attributes | |
| std::array< float, uIntegerHalfPi+1 > | _cosTable |
Lookup table for trigonometric functions.
| TrigTableLookup::TrigTableLookup | ( | ) |
| int TrigTableLookup::atan2 | ( | int | x, |
| int | y | ||
| ) | const |
| float TrigTableLookup::cos | ( | int | angle | ) | const |
| angle | Angle in 1/2048ths of a full circle. |
| float TrigTableLookup::sin | ( | int | angle | ) | const |
| angle | Angle in 1/2048ths of a full circle. |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |