2
3
4
5
6
7
8
9
10
40
41
42
43
46 SHZ_FORCE_INLINE
sincos(
const shz_sincos_t& val)
noexcept:
65 SHZ_FORCE_INLINE
float sinf()
const noexcept {
return this->sin; }
67 SHZ_FORCE_INLINE
float cosf()
const noexcept {
return this->cos; }
78 SHZ_FORCE_INLINE operator std::pair<
float,
float>()
const noexcept {
87
88
89
109
110
111
141
142
143
168
169
170
188
189
190
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().
constexpr float tau_f
Floating-point constant approximation for Pi*2.
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_atanf(float x) noexcept
Fast arctangent approximation; equvalent to C's atanf().
shz_sincos_t shz_sincosf_deg(float degrees) noexcept
Returns sinf/cosf() pairs for the given floating-point angle in degrees.
float shz_atanhf(float x) noexcept
Fast hyperbolic arctangent function.
float shz_cotf_deg(float degrees) noexcept
One-off routine for returning only cotangent (1 / cot(x)) from an angle in degrees.
float shz_atanf_unit(float x) noexcept
Fast arctangent approximation for unit values between 0.0f and 1.0f.
float shz_acoshf(float x) noexcept
Fast hyperbolic arccosine function.
#define SHZ_F_PI
Single-precision floating-point PI approximation (do not use M_PI!)
#define SHZ_F_TAU
Single-precision FP PI approximation times 2.
float shz_acosf(float x) noexcept
Fast arccosine approximation; equivalent to C's acosf().
float shz_cscf_deg(float degrees) noexcept
One-off routine for returning only cosecant (1 / sin(x)) from an angle in degrees.
float shz_cosf_deg(float degrees) noexcept
One-off routine for returning only cosf() from an angle in degrees.
shz_sincos_t shz_sincosf(float radians) noexcept
Returns sinf()/cosf() pairs for the given floating-point angle in radians.
#define SHZ_FSCA_DEG_FACTOR
Multiplicative factor for passing the FSCA instrution angles in degrees.
float shz_tanf_deg(float degrees) noexcept
One-off routine for returning only tanf() from an angle in degrees.
float shz_cosf(float radians) noexcept
One-off routine for returning only cosf() from an angle in radians.
float shz_acothf(float x) noexcept
Fast hyperbolic arccotangent function.
#define SHZ_F_PI_4
Single-precision FP PI approximation divided by 4.
float shz_sinf_deg(float degrees) noexcept
One-off routine for returning only sinf() from an angle in degrees.
float shz_secf(float radians) 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_tanf(float radians) noexcept
One-off routine for returning only tanf() from an angle in radians.
float shz_sinf(float radians) noexcept
One-off routine for returning only sinf() from an angle in radians.
float shz_coshf(float x) noexcept
Fast hyperbolic cosine function.
#define SHZ_RAD_TO_DEG(rad)
Converts the given angle in radians to degrees.
shz_sincos_t shz_sincosu16(uint16_t radians16) noexcept
Returns sinf()/cosf() pairs for the given unsigned 16-bit angle in radians.
float shz_cothf(float x) noexcept
Fast hyperbolic cotangent function.
float shz_sincos_cscf(shz_sincos_t sincos) noexcept
Returns the floating-point cosecant (1.0f / sinf(x)) from the given pre-computed sincos pair.
float shz_asechf(float x) noexcept
Fast hyperbolic arcsecant function.
float shz_atan2f(float y, float x) noexcept
Computes arctangent of y / x, using the signs of arguments to determine correct quadtrant....
float shz_asecf(float x) noexcept
Fast arcsecant/inverse secant approximation, taking units in radians.
float shz_secf_deg(float degrees) noexcept
One-off routine for returning only secant (1 / cos(x)) from an angle in degrees.
float shz_acscf(float x) noexcept
Fast arccosecant/inverse cosecant approximation; taking units in radians.
float shz_sincos_secf(shz_sincos_t sincos) noexcept
Returns the floating-point secant (1.0f / cosf(x)) from the given pre-computed sincos pair.
float shz_sincos_tanf(shz_sincos_t sincos) noexcept
Returns tanf() from the given pre-computed sincos pair.
float shz_cscf(float radians) noexcept
One-off routine for returning only cosecant (1 / sin(x)) from an angle in radians.
float shz_asinf(float x) noexcept
Fast arcsine approximation; equivalent to C's asinf().
float shz_cotf(float radians) noexcept
One-off routine for returning only cotangent (1 / tan(x)) from an angle in radians.
float shz_sincos_cotf(shz_sincos_t sincos) noexcept
Returns the floating-point cotangent (1.0f / tanf(x)) from the given pre-computed sincos pair.
float shz_asinhf(float x) noexcept
Fast hyperbolic arcsine function.
float shz_atanf_q1(float x) noexcept
Fast arctangent approximation for values lying within the first quadrant (>= 0.0f).
float shz_tanhf(float x) noexcept
Fast hyperbolic tangent function.
#define SHZ_DEG_TO_RAD(deg)
Converts the given angle in degrees to radians.
float shz_acschf(float x) noexcept
Fast hyperbolic arccosecant function.
float shz_sechf(float x) noexcept
Fast hyperbolic secant function.
float shz_cschf(float x) noexcept
Fast hyperbolic cosecant function.
float shz_acotf(float x) noexcept
Fast arccotangent/inverse cotangent approximation; taking units in radians.
#define SHZ_F_PI_2
Single-precision FP PI approximation divided by 2.
float shz_sinhf(float x) noexcept
Fast hyperbolic sine 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.
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.
sincos(const shz_sincos_t &val) noexcept
Converting constructor from C struct.
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