shz_sincos_t
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.
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
sin | float | sinf() approximation for the angle |
cos | float | cosf() approximation for the angle |
Details
Section titled “Details”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.
Availability
Section titled “Availability”- C++ equivalent:
shz::sincos - Back-ends: n/a (not a function)
- Defined in:
sh4zam/shz_trig.h:57 - Module: Trigonometry, section "Types"