3.9.1 mcUtils_TruncateAngle0To2Pi

C


/* Truncate angle to  0 to 2pi */
void mcUtils_TruncateAngle0To2Pi( float32_t * const angle )	

Summary

This function truncates the input angle to the range of 0 to 2π.

Description

This function truncates the input angle to the range of [0, 2π).

Precondition

None.

Parameters

ParamDescription
anglePointer to the angle value in radians that needs to be truncated to the range [0, 2π).

Returns

None

Example

Float32_t angle = -1.0f;

/* Normalize the angle to the range [0, 2π)  */
mcUtils_TruncateAngle0To2Pi(&angle);

    

Remarks

None.