12 template <
typename T = nem::real>
18 template <
typename T = nem::real>
24 template <
typename T = nem::real>
32 template<
typename T = nem::real>
38 template<
typename T = nem::real>
47 template<
typename T = nem::real>
53 template<
typename T = nem::real>
59 template<
typename T = nem::real>
71 template <
typename T = nem::real>
80 template <
typename T = nem::real>
90 auto q0 = q.
s, q1 = q.
x, q2 = q.
y, q3 = q.
z;
92 { 2 * (q0 * q0 + q1 * q1) - 1, 2 * (q1 * q2 - q0 * q3), 2 * (q1 * q3 + q0 * q2) },
93 { 2 * (q1 * q2 + q0 * q3), 2 * (q0 * q0 + q2 * q2) - 1, 2 * (q2 * q3 - q0 * q1) },
94 { 2 * (q1 * q3 - q0 * q2), 2 * (q2 * q3 + q0 * q1), 2 * (q0 * q0 + q3 * q3) - 1 }
T invalid_result(nem::error::Kind kind=Kind::RuntimeError, const char *const msg=nullptr)
nem::quat_t< T > normalize(nem::quat_t< T > q)
constexpr nem::quat_t< T > make_quat(const nem::vec< T, 4 > &vec4)
constexpr nem::quat_t< T > inverse(const nem::quat_t< T > &q)
constexpr nem::quat_t< T > conjugate(const nem::quat_t< T > &q)
Conjugates the quaternion, yielding a quaternion with the same angle (scalar) but inverse axis (vecto...
constexpr nem::sincos< T > get_sincos(T radians)
constexpr T sqr_length(const nem::quat_t< T > &q)
constexpr T radians(T radians) noexcept
Converts radians to radians (passes the argument unchanged). Used to make units explicit.
constexpr T sqr(T value) noexcept
constexpr bool equal(T a, T b) noexcept
Are a and b nearly equal? Given an Epsilon > 0, within each all numbers are considered indistinguisab...
T length(const nem::quat_t< T > &q)
constexpr nem::mat< T, 3, 3 > norm_quaterion_to_rotation_matrix(const nem::quat_t< T > &q)
nem::quat_t< T > from_axis_angle(const nem::vec< T, 3 > &axis, T radians)
nem::quat_t< T > from_euler(T pitch, T yaw, T roll)
constexpr nem::vec< T, 3 > extract_vector(const nem::quat_t< T > &q)