NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
cM Namespace Reference

Description

C Math library.

Functions

float getCircleUnit ()
 
bool isZero (float val)
 
s16 rad2s (float rad)
 Converts an angle from radians to units.
 
u32 atan2i (float sin, float cos)
 
s16 atan2s (float sin, float cos)
 Converts a sine and a cosine to an angle in units.
 
void initRnd (ulong seed)
 Initializes s_rnd with the given seed.
 
float rnd ()
 Generates a floating point number between 0 and 1.
 
int rndInt (int max)
 Generates an integer between 0 and the given max.
 
float rndF (float max)
 Generates a floating point number between 0 and the given max.
 

Function Documentation

◆ getCircleUnit()

float cM::getCircleUnit ( )
inline

Definition at line 96 of file c_math.cpp.

◆ isZero()

bool cM::isZero ( float val)
inline

Definition at line 100 of file c_math.cpp.

◆ rad2s()

s16 cM::rad2s ( float rad)

Converts an angle from radians to units.

Definition at line 104 of file c_math.cpp.

◆ atan2i()

u32 cM::atan2i ( float sin,
float cos )
inline

Definition at line 126 of file c_math.cpp.

◆ atan2s()

s16 cM::atan2s ( float sin,
float cos )

Converts a sine and a cosine to an angle in units.

Definition at line 168 of file c_math.cpp.

◆ initRnd()

void cM::initRnd ( ulong seed)

Initializes s_rnd with the given seed.

Definition at line 172 of file c_math.cpp.

◆ rnd()

float cM::rnd ( )

Generates a floating point number between 0 and 1.

Definition at line 176 of file c_math.cpp.

◆ rndInt()

int cM::rndInt ( int max)

Generates an integer between 0 and the given max.

Definition at line 180 of file c_math.cpp.

◆ rndF()

float cM::rndF ( float max)

Generates a floating point number between 0 and the given max.

Definition at line 184 of file c_math.cpp.