Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
c_math.cpp File Reference

Functions

s16 cM_rad2s (float rad)
 
u16 U_GetAtanTable (float f0, float f1)
 
s16 cM_atan2s (float y, float x)
 
float cM_atan2f (float y, float x)
 
void cM_initRnd (int s0, int s1, int s2)
 
float cM_rnd ()
 
float cM_rndF (float max)
 
float cM_rndFX (float max)
 
void cM_initRnd2 (int s0, int s1, int s2)
 
float cM_rnd2 ()
 
float cM_rndF2 (float max)
 
float cM_rndFX2 (float max)
 

Variables

static u16 atntable [1025]
 
static s32 r0
 
static s32 r1
 
static s32 r2
 
static s32 r02
 
static s32 r12
 
static s32 r22
 

Function Documentation

◆ cM_atan2f()

float cM_atan2f ( f32  y,
f32  x 
)

◆ cM_atan2s()

s16 cM_atan2s ( float  y,
float  x 
)

◆ cM_initRnd()

void cM_initRnd ( int  s0,
int  s1,
int  s2 
)

◆ cM_initRnd2()

void cM_initRnd2 ( int  s0,
int  s1,
int  s2 
)

◆ cM_rad2s()

s16 cM_rad2s ( float  rad)

c_math.cpp Math Helper Utilities

◆ cM_rnd()

float cM_rnd ( )

Gets a random value

Returns
a random value

◆ cM_rnd2()

float cM_rnd2 ( )

◆ cM_rndF()

float cM_rndF ( float  max)

Gets a random value between 0 and a given upper bound

Parameters
maxThe upper bound the random value can be
Returns
a random value between 0 and max

◆ cM_rndF2()

float cM_rndF2 ( float  max)

◆ cM_rndFX()

float cM_rndFX ( float  max)

Gets a random value between given bounds

Parameters
maxThe upper and lower bound the random value can be
Returns
a random value between -max and +max

◆ cM_rndFX2()

float cM_rndFX2 ( float  max)

◆ U_GetAtanTable()

u16 U_GetAtanTable ( float  f0,
float  f1 
)

Variable Documentation

◆ atntable

u16 atntable[1025]
static

◆ r0

s32 r0
static

◆ r02

s32 r02
static

◆ r1

s32 r1
static

◆ r12

s32 r12
static

◆ r2

s32 r2
static

◆ r22

s32 r22
static