3.9.2 mcUtils_SineCosineCalculation
C
/* Calculate sine and cosine value */
void mcUtils_SineCosineCalculation(const float32_t angle,
float32_t * const sine, float32_t * const cosine )
Summary
This function calculate the sine and cosine values.
Description
The function computes the sine and cosine values for a given angle using linear interpolation on precomputed sine and cosine tables to provide accurate results.
Precondition
None.
Parameters
Param | Description |
---|---|
angle | The input angle in radians (0-2π)for which the sine and cosine values need to be calculated. |
sine | Pointer to the variable, where the computed sine value will be stored. |
cosine | Pointer to the variable, where the computed cosine value will be stored. |
Returns
None
Example
Float32_t sineValue;
Float32_t cosineValue;
/* Calculate sine and cosine value */
mcUtils_SineCosineCalculation(0.5f, &sineValue, &cosineValue);
Remarks
None.