Functions

float hal_gfx_sin (float angle_degrees)
 Fast sine approximation of a given angle. More...
 
float hal_gfx_cos (float angle_degrees)
 Fast cosine approximation of a given angle. More...
 
float hal_gfx_tan (float angle_degrees)
 Fast tangent approximation of a given angle. More...
 
float hal_gfx_pow (float x, float y)
 A rough approximation of x raised to the power of y. USE WITH CAUTION! More...
 
float hal_gfx_sqrt (float x)
 A rough approximation of the square root of x. USE WITH CAUTION! More...
 
float hal_gfx_atan (float x)
 A floating-point approximation of the inverse tangent of x. More...
 
int hal_gfx_f2fx (float f)
 Convert float to 16.16 fixed point. More...
 

Detailed Description

Function Documentation

◆ hal_gfx_atan()

float hal_gfx_atan ( float  x)

A floating-point approximation of the inverse tangent of x.

Parameters
[in]xX value
Returns
Inverse tangent (angle) of x in degrees

◆ hal_gfx_cos()

float hal_gfx_cos ( float  angle_degrees)

Fast cosine approximation of a given angle.

Parameters
[in]angle_degreesAngle in degrees
Returns
Cosine of the given angle

◆ hal_gfx_f2fx()

int hal_gfx_f2fx ( float  f)

Convert float to 16.16 fixed point.

Parameters
[in]fValue to be converted
Returns
16.16 fixed point value

◆ hal_gfx_pow()

float hal_gfx_pow ( float  x,
float  y 
)

A rough approximation of x raised to the power of y. USE WITH CAUTION!

Parameters
[in]xbase value. Must be non negative.
[in]ypower value
Returns
The result of raising x to the power y

◆ hal_gfx_sin()

float hal_gfx_sin ( float  angle_degrees)

Fast sine approximation of a given angle.

Parameters
[in]angle_degreesAngle in degrees
Returns
return Sine of the given angle

◆ hal_gfx_sqrt()

float hal_gfx_sqrt ( float  x)

A rough approximation of the square root of x. USE WITH CAUTION!

Parameters
[in]xX value. Must be non negative
Returns
The square root of x

◆ hal_gfx_tan()

float hal_gfx_tan ( float  angle_degrees)

Fast tangent approximation of a given angle.

Parameters
[in]angle_degreesAngle in degrees
Returns
Tangent of the given angle