2
3
4
5
6
7
8
9
10
38
39
40
41
44 SHZ_FORCE_INLINE
sincos(shz_sincos_t val)
noexcept:
63 SHZ_FORCE_INLINE
float sinf()
const noexcept {
return this->sin; }
65 SHZ_FORCE_INLINE
float cosf()
const noexcept {
return this->cos; }
76 SHZ_FORCE_INLINE operator std::pair<
float,
float>()
const noexcept {
85
86
87
107
108
109
139
140
141
166
167
168
186
187
188
Namespace enclosing the SH4ZAM C++ API.
constexpr float rad_to_deg(float rad) noexcept
Converts radians to degrees.
constexpr auto sincos_cotf
C++ wrapper around shz_sincos_cotf().
float coshf(float x) noexcept
C++ wrapper around shz_coshf().
constexpr auto tanf_deg
C++ wrapper around shz_tanf_deg().
constexpr float deg_to_rad(float deg) noexcept
Converts degrees to radians.
constexpr auto asecf
C++ wrapper around shz_asecf().
constexpr auto sinf_deg
C++ wrapper around shz_sinf_deg().
float cschf(float x) noexcept
C++ wrapper around shz_cschf().
constexpr auto cscf
C++ wrapper around shz_cscf().
constexpr auto secf_deg
C++ wrapper around shz_secf_deg().
constexpr auto sinf
C++ wrapper around shz_sinf().
float acoshf(float x) noexcept
C++ wrapper around shz_acoshf().
constexpr auto sincos_secf
C++ wrapper around shz_sincos_secf().
constexpr auto sincos_tanf
C++ wrapper around shz_sincos_tanf().
constexpr auto acosf
C++ wrapper around shz_acosf().
constexpr float fsca_rad_factor
Scaling factor used to scale the input to FSCA from radians.
constexpr auto tanf
C++ wrapper around shz_tanf().
constexpr float pi_f
Floating-point constant approximation for Pi.
constexpr auto atanf_q1
C++ wrapper around shz_atanf_q1().
float sechf(float x) noexcept
C++ wrapper around shz_sechf().
constexpr auto cosf
C++ wrapper around shz_cosf().
constexpr float pi_f_2
Floating-point constant approximation for Pi/2.
float cothf(float x) noexcept
C++ wrapper around shz_cothf().
constexpr auto cscf_deg
C++ wrapper around shz_cscf_deg().
float asinhf(float x) noexcept
C++ wrapper around shz_asinhf().
constexpr auto secf
C++ wrapper around shz_secf().
constexpr auto atanf
C++ wrapper around shz_atanf().
constexpr auto cosf_deg
C++ wrapper around shz_cosf_deg().
constexpr auto cotf
C++ wrapper around shz_cotf().
float tanhf(float x) noexcept
C++ wrapper around shz_tanhf().
float acothf(float x) noexcept
C++ wrapper around shz_acothf().
constexpr float fsca_deg_factor
Scaling factor used to scale the input to FSCA from degrees.
float asechf(float x) noexcept
C++ wrapper around shz_asechf().
constexpr auto sincos_cscf
C++ wrapper around shz_sincos_cscf().
constexpr auto acscf
C++ wrapper around shz_acscf().
float sinhf(float x) noexcept
C++ wrapper around shz_sinhf().
constexpr auto acotf
C++ wrapper around shz_acotf().
constexpr auto sincosf_deg
C++ wrapper around shz_sincosf_deg().
constexpr float pi_f_4
Floating-point constant approximation for Pi/4.
constexpr auto atanf_unit
C++ wrapper around shz_atanf_unit().
float atanhf(float x) noexcept
C++ wrapper around shz_atanhf().
constexpr auto sincosf
C++ wrapper around shz_sincosf().
float acschf(float x) noexcept
C++ wrapper around shz_acscf().
constexpr auto atan2f
C++ wrapper around shz_atan2f().
constexpr auto asinf
C++ wrapper around shz_asinf().
constexpr auto sincosu16
C++ wrapper around shz_sincosu16().
constexpr auto cotf_deg
C++ wrapper around shz_cotf_deg().
float shz_cscf(float radians) SHZ_NOEXCEPT
One-off routine for returning only cosecant (1 / sin(x)) from an angle in radians.
float shz_acotf(float x) SHZ_NOEXCEPT
Fast arccotangent/inverse cotangent approximation; taking units in radians.
float shz_cothf(float x) SHZ_NOEXCEPT
Fast hyperbolic cotangent function.
float shz_tanf(float radians) SHZ_NOEXCEPT
One-off routine for returning only tanf() from an angle in radians.
#define SHZ_F_PI
Single-precision floating-point PI approximation (do not use M_PI!)
float shz_cosf_deg(float degrees) SHZ_NOEXCEPT
One-off routine for returning only cosf() from an angle in degrees.
float shz_acosf(float x) SHZ_NOEXCEPT
Fast arccosine approximation; equivalent to C's acosf().
float shz_sincos_secf(shz_sincos_t sincos) SHZ_NOEXCEPT
Returns the floating-point secant (1.0f / cosf(x)) from the given pre-computed sincos pair.
float shz_sincos_cotf(shz_sincos_t sincos) SHZ_NOEXCEPT
Returns the floating-point cotangent (1.0f / tanf(x)) from the given pre-computed sincos pair.
shz_sincos_t shz_sincosu16(uint16_t radians16) SHZ_NOEXCEPT
Returns sinf()/cosf() pairs for the given unsigned 16-bit angle in radians.
float shz_acothf(float x) SHZ_NOEXCEPT
Fast hyperbolic arccotangent function.
float shz_cschf(float x) SHZ_NOEXCEPT
Fast hyperbolic cosecant function.
float shz_tanf_deg(float degrees) SHZ_NOEXCEPT
One-off routine for returning only tanf() from an angle in degrees.
#define SHZ_FSCA_DEG_FACTOR
Multiplicative factor for passing the FSCA instrution angles in degrees.
#define SHZ_F_PI_4
Single-precision FP PI approximation divided by 4.
float shz_atanf(float x) SHZ_NOEXCEPT
Fast arctangent approximation; equvalent to C's atanf().
float shz_atanf_unit(float x) SHZ_NOEXCEPT
Fast arctangent approximation for unit values between 0.0f and 1.0f.
float shz_secf(float radians) SHZ_NOEXCEPT
One-off routine for returning only secant (1 / cos(x)) from an angle in radians.
#define SHZ_FSCA_RAD_FACTOR
Multiplicative factor for passing the FSCA instruction angles in radians.
float shz_coshf(float x) SHZ_NOEXCEPT
Fast hyperbolic cosine function.
float shz_acoshf(float x) SHZ_NOEXCEPT
Fast hyperbolic arccosine function.
shz_sincos_t shz_sincosf_deg(float degrees) SHZ_NOEXCEPT
Returns sinf/cosf() pairs for the given floating-point angle in degrees.
shz_sincos_t shz_sincosf(float radians) SHZ_NOEXCEPT
Returns sinf()/cosf() pairs for the given floating-point angle in radians.
#define SHZ_RAD_TO_DEG(rad)
Converts the given angle in radians to degrees.
float shz_cosf(float radians) SHZ_NOEXCEPT
One-off routine for returning only cosf() from an angle in radians.
float shz_sincos_cscf(shz_sincos_t sincos) SHZ_NOEXCEPT
Returns the floating-point cosecant (1.0f / sinf(x)) from the given pre-computed sincos pair.
float shz_sinf(float radians) SHZ_NOEXCEPT
One-off routine for returning only sinf() from an angle in radians.
float shz_sechf(float x) SHZ_NOEXCEPT
Fast hyperbolic secant function.
float shz_cotf(float radians) SHZ_NOEXCEPT
One-off routine for returning only cotangent (1 / tan(x)) from an angle in radians.
float shz_cotf_deg(float degrees) SHZ_NOEXCEPT
One-off routine for returning only cotangent (1 / cot(x)) from an angle in degrees.
float shz_acscf(float x) SHZ_NOEXCEPT
Fast arccosecant/inverse cosecant approximation; taking units in radians.
float shz_asechf(float x) SHZ_NOEXCEPT
Fast hyperbolic arcsecant function.
float shz_atanhf(float x) SHZ_NOEXCEPT
Fast hyperbolic arctangent function.
float shz_asinf(float x) SHZ_NOEXCEPT
Fast arcsine approximation; equivalent to C's asinf().
float shz_cscf_deg(float degrees) SHZ_NOEXCEPT
One-off routine for returning only cosecant (1 / sin(x)) from an angle in degrees.
float shz_asecf(float x) SHZ_NOEXCEPT
Fast arcsecant/inverse secant approximation, taking units in radians.
float shz_atan2f(float y, float x) SHZ_NOEXCEPT
Computes arctangent of y / x, using the signs of arguments to determine correct quadtrant....
float shz_secf_deg(float degrees) SHZ_NOEXCEPT
One-off routine for returning only secant (1 / cos(x)) from an angle in degrees.
float shz_sinf_deg(float degrees) SHZ_NOEXCEPT
One-off routine for returning only sinf() from an angle in degrees.
float shz_asinhf(float x) SHZ_NOEXCEPT
Fast hyperbolic arcsine function.
float shz_sinhf(float x) SHZ_NOEXCEPT
Fast hyperbolic sine function.
float shz_tanhf(float x) SHZ_NOEXCEPT
Fast hyperbolic tangent function.
float shz_atanf_q1(float x) SHZ_NOEXCEPT
Fast arctangent approximation for values lying within the first quadrant (>= 0.0f).
#define SHZ_DEG_TO_RAD(deg)
Converts the given angle in degrees to radians.
float shz_sincos_tanf(shz_sincos_t sincos) SHZ_NOEXCEPT
Returns tanf() from the given pre-computed sincos pair.
#define SHZ_F_PI_2
Single-precision FP PI approximation divided by 2.
float shz_acschf(float x) SHZ_NOEXCEPT
Fast hyperbolic arccosecant function.
C++ sine/cosine approximation pairs.
float secf() const noexcept
Calculates the secant from the given pair.
static sincos from_radians(float rad) noexcept
Returns a new sin/cos pair from the given angle in radians.
float sinf() const noexcept
Returns the sine component from the pair.
sincos(shz_sincos_t val) noexcept
Converting constructor from C struct.
float cotf() const noexcept
Calculates the cotangent from the given pair.
static sincos from_radians(uint16_t rad) noexcept
Returns a new sin/cos pair from the given 16-bit integer angle in radians.
float cosf() const noexcept
Returns the cosine component from the pair.
float cscf() const noexcept
Calculates the cosecant from the given pair.
static sincos from_degrees(float deg) noexcept
Returns a new sin/cos pair from the given angle in degrees.
float tanf() const noexcept
Calculates the tangent from the given pair.
float cos
cosf() approximation for the angle
float sin
sinf() approximation for the angle