OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
TrigTableLookup Class Reference

#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
 

Detailed Description

Lookup table for trigonometric functions.

Constructor & Destructor Documentation

◆ TrigTableLookup()

TrigTableLookup::TrigTableLookup ( )
Original binary offset:
0x00452969

Member Function Documentation

◆ atan2()

int TrigTableLookup::atan2 ( int  x,
int  y 
) const
Original binary offset:
0x0045281E
Returns
Angle in 1/2048ths of a full circle. Actual result is in range [0, 2047].

◆ cos()

float TrigTableLookup::cos ( int  angle) const
Original binary offset:
0x00402CAE
Parameters
angleAngle in 1/2048ths of a full circle.
Returns
Cosine of the provided angle.

◆ sin()

float TrigTableLookup::sin ( int  angle) const
Original binary offset:
0x0042EBDB
Parameters
angleAngle in 1/2048ths of a full circle.
Returns
Sine of the provided angle.

Member Data Documentation

◆ _cosTable

std::array<float, uIntegerHalfPi + 1> TrigTableLookup::_cosTable
private

◆ uDoublePiMask

const int TrigTableLookup::uDoublePiMask = 2047
static

◆ uHalfPiMask

const int TrigTableLookup::uHalfPiMask = 511
static

◆ uIntegerDoublePi

const int TrigTableLookup::uIntegerDoublePi = 2048
static

◆ uIntegerHalfPi

const int TrigTableLookup::uIntegerHalfPi = 512
static

◆ uIntegerPi

const int TrigTableLookup::uIntegerPi = 1024
static

◆ uIntegerQuarterPi

const int TrigTableLookup::uIntegerQuarterPi = 256
static

◆ uPiMask

const int TrigTableLookup::uPiMask = 1023
static

The documentation for this class was generated from the following files: