Loading [MathJax]/extensions/tex2jax.js
Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
c_math.cpp File Reference

Functions

s16 cM_rad2s (f32 rad)
 
u16 U_GetAtanTable (f32 f0, f32 f1)
 
s16 cM_atan2s (f32 y, f32 x)
 
f32 cM_atan2f (f32 y, f32 x)
 
void cM_initRnd (int s0, int s1, int s2)
 
f32 cM_rnd ()
 
f32 cM_rndF (f32 max)
 
f32 cM_rndFX (f32 max)
 
void cM_initRnd2 (int s0, int s1, int s2)
 
f32 cM_rnd2 ()
 
f32 cM_rndF2 (f32 max)
 
f32 cM_rndFX2 (f32 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()

f32 cM_atan2f ( f32 y,
f32 x )

◆ cM_atan2s()

s16 cM_atan2s ( f32 y,
f32 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 ( f32 rad)

c_math.cpp Math Helper Utilities

◆ cM_rnd()

f32 cM_rnd ( )

Gets a random value

Returns
a random value

◆ cM_rnd2()

f32 cM_rnd2 ( )

◆ cM_rndF()

f32 cM_rndF ( f32 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()

f32 cM_rndF2 ( f32 max)

◆ cM_rndFX()

f32 cM_rndFX ( f32 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()

f32 cM_rndFX2 ( f32 max)

◆ U_GetAtanTable()

u16 U_GetAtanTable ( f32 f0,
f32 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