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

Go to the source code of this file.

Functions

s16 cM_rad2s (float rad)
 
u16 U_GetAtanTable (float, float)
 
s16 cM_atan2s (float y, float x)
 
float cM_atan2f (float y, float x)
 
void cM_initRnd (int, int, int)
 
float cM_rnd ()
 
float cM_rndF (float)
 
float cM_rndFX (float)
 
void cM_initRnd2 (int, int, int)
 
float cM_rnd2 ()
 
float cM_rndF2 (float)
 
float cM_rndFX2 (float)
 
f32 cM_scos (s16 x)
 
f32 cM_ssin (s16 x)
 
s16 cM_deg2s (f32 deg)
 
s16 i_cM_deg2s (f32 deg)
 
f32 cM_fcos (f32 x)
 
f32 cM_fsin (f32 x)
 
f32 cM_sht2d (f32 v)
 
f32 cM_s2rad (s16 x)
 

Function Documentation

◆ cM_atan2f()

float cM_atan2f ( float  y,
float  x 
)

◆ cM_atan2s()

s16 cM_atan2s ( float  y,
float  x 
)

◆ cM_deg2s()

s16 cM_deg2s ( f32  deg)
inline

◆ cM_fcos()

f32 cM_fcos ( f32  x)
inline

◆ cM_fsin()

f32 cM_fsin ( f32  x)
inline

◆ 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)

◆ cM_s2rad()

f32 cM_s2rad ( s16  x)
inline

◆ cM_scos()

f32 cM_scos ( s16  x)
inline

◆ cM_sht2d()

f32 cM_sht2d ( f32  v)
inline

◆ cM_ssin()

f32 cM_ssin ( s16  x)
inline

◆ i_cM_deg2s()

s16 i_cM_deg2s ( f32  deg)
inline

◆ U_GetAtanTable()

u16 U_GetAtanTable ( float  f0,
float  f1 
)