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

Description

Math library.

Classes

struct  MTX34
 A 3x4 matrix. More...
 
struct  VEC2
 A two-dimensional floating point vector. More...
 
struct  VEC3
 A three-dimensional floating point vector. More...
 

Functions

float FrSqrt (float x)
 Computes the inverse square root of the given value.
 
float FSqrt (float x)
 Computes the square root of the given value.
 
float SinFIdx (float fidx)
 Computes the sine value.
 
float CosFIdx (float fidx)
 Computes the cosine value.
 
float SinF (float ang)
 Computes the sine value.
 
float CosF (float ang)
 Computes the cosine value.
 
float SinS (short ang)
 Computes the sine value.
 
float CosS (short ang)
 Computes the cosine value.
 

Variables

const f32 F_PI = 3.141592653589793f
 The value of PI.
 

Function Documentation

◆ FrSqrt()

float nw4r::math::FrSqrt ( float  x)

Computes the inverse square root of the given value.

◆ FSqrt()

float nw4r::math::FSqrt ( float  x)
inline

Computes the square root of the given value.

Definition at line 12 of file arithmetic.hpp.

◆ SinFIdx()

float nw4r::math::SinFIdx ( float  fidx)

Computes the sine value.

Parameters
fidxThe angle, measured in units of 1/256th of a circle.
Returns
The sine for fidx.

◆ CosFIdx()

float nw4r::math::CosFIdx ( float  fidx)

Computes the cosine value.

Parameters
fidxThe angle, measured in units of 1/256th of a circle.
Returns
The cosine for fidx.

◆ SinF()

float nw4r::math::SinF ( float  ang)
inline

Computes the sine value.

Parameters
angThe angle, measured in units of 1/65536th of a circle.
Returns
The sine for idx.

Definition at line 22 of file trigonometry.hpp.

◆ CosF()

float nw4r::math::CosF ( float  ang)
inline

Computes the cosine value.

Parameters
idxThe angle measured in units of 1/65536th of a circle.
Returns
The cosine for idx.

Definition at line 29 of file trigonometry.hpp.

◆ SinS()

float nw4r::math::SinS ( short  ang)
inline

Computes the sine value.

Parameters
angThe angle, measured in units of 1/65536th of a circle.
Returns
The sine for idx.

Definition at line 36 of file trigonometry.hpp.

◆ CosS()

float nw4r::math::CosS ( short  ang)
inline

Computes the cosine value.

Parameters
idxThe angle measured in units of 1/65536th of a circle.
Returns
The cosine for idx.

Definition at line 43 of file trigonometry.hpp.

Variable Documentation

◆ F_PI

const f32 nw4r::math::F_PI = 3.141592653589793f

The value of PI.

Definition at line 8 of file constant.hpp.