Skip to content

shz_sincos_t

Markdown
typedef struct shz_sincos {
float sin; //!< sinf() approximation for the angle
float cos; //!< cosf() approximation for the angle
} shz_sincos_t;

Pair representing the sine and cosine of a given angle.

FieldTypeDescription
sinfloatsinf() approximation for the angle
cosfloatcosf() approximation for the angle

The SH4 provides a single instruction, FSCA, for retrieving fast approximations of both the sine and cosine of a given angle. As such, when you need both values, it's most efficient to grab them both at once as a pair using this structure than it is to retrieve them separately.

shz_sincosf, shz_sincosf_deg