Module math

Source
Expand description

A few useful math (trigonometric) functions for f32.

Use micromath and nalgebra if you need more.

Functions§

abs
Returns the absolute value of a number.
atan
Approximates atan(x) approximation in radians with a maximum error of 0.002.
atan_norm
Approximates atan(x) normalized to the [−1,1] range with a maximum error of 0.1620 degrees.
cos
Approximates cos(x) in radians with a maximum error of 0.002.
floor
Returns the largest integer less than or equal to a number.
rem_euclid
sin
Approximates sin(x) in radians with a maximum error of 0.002.
sqrt
Approximates the square root of a number with an average deviation of ~5%.
tan
Approximates tan(x) in radians with a maximum error of 0.6.