shz::sincos
C++ sine/cosine approximation pairs.
This structure contains the precomputed values for both sine and cosine of an angle.
- Header:
#include <sh4zam/shz_trig.hpp>(source) - C type:
shz_sincos_t(layout-compatible; the C API accepts it directly) - Bases:
shz_sincos_t
Static functions
Section titled “Static functions”from_radians
Section titled “from_radians”static sincos from_radians(float rad) noexceptstatic sincos from_radians(uint16_t rad) noexceptReturns a new sin/cos pair from the given angle in radians.
Calls: shz_sincosf(), shz_sincosu16()
from_degrees
Section titled “from_degrees”static sincos from_degrees(float deg) noexceptReturns a new sin/cos pair from the given angle in degrees.
Calls: shz_sincosf_deg()
Members
Section titled “Members”sincos
Section titled “sincos”sincos(const shz_sincos_t &val) noexceptConverting constructor from C struct.
float sinf() const noexceptReturns the sine component from the pair.
float cosf() const noexceptReturns the cosine component from the pair.
float tanf() const noexceptCalculates the tangent from the given pair.
Calls: shz_sincos_tanf()
float secf() const noexceptCalculates the secant from the given pair.
Calls: shz_sincos_secf()
float cscf() const noexceptCalculates the cosecant from the given pair.
Calls: shz_sincos_cscf()
float cotf() const noexceptCalculates the cotangent from the given pair.
Calls: shz_sincos_cotf()
operator std::pair< float, float >
Section titled “operator std::pair< float, float >”operator std::pair< float, float >() const noexceptfloat shz_sincos_t::coscosf() approximation for the angle
Inherited from shz::vecN.
float shz_sincos_t::sinsinf() approximation for the angle
Inherited from shz::vecN.