Skip to content

quaternion #

Quaternions

The functions provided by this module add support for quaternions. The algorithms take care to avoid unnecessary intermediate underflows and overflows, allowing the functions to be evaluated over as much of the quaternion plane as possible.

fn from_axis_anglef3 #

fn from_axis_anglef3(angle f64, x f64, y f64, z f64) Quaternion

fn from_euler_angles #

fn from_euler_angles(alpha f64, beta f64, gamma f64) Quaternion

fn from_spherical_coords #

fn from_spherical_coords(theta f64, phi f64) Quaternion

fn id #

fn id() Quaternion

fn quaternion #

fn quaternion(w f64, x f64, y f64, z f64) Quaternion

struct Quaternion #

struct Quaternion {
pub:
	w f64
	x f64
	y f64
	z f64
}

fn (Quaternion) * #

fn (q1 Quaternion) * (q2 Quaternion) Quaternion

fn (Quaternion) + #

fn (q1 Quaternion) + (q2 Quaternion) Quaternion

fn (Quaternion) - #

fn (q1 Quaternion) - (q2 Quaternion) Quaternion

fn (Quaternion) / #

fn (q1 Quaternion) / (q2 Quaternion) Quaternion

fn (Quaternion) abs #

fn (q Quaternion) abs() f64

fn (Quaternion) add #

fn (q1 Quaternion) add(q2 Quaternion) Quaternion

fn (Quaternion) angle #

fn (q Quaternion) angle() f64

fn (Quaternion) conjugate #

fn (q Quaternion) conjugate() Quaternion

fn (Quaternion) copy #

fn (q Quaternion) copy() Quaternion

fn (Quaternion) divide #

fn (q1 Quaternion) divide(q2 Quaternion) Quaternion

fn (Quaternion) equal #

fn (q1 Quaternion) equal(q2 Quaternion) bool

fn (Quaternion) exp #

fn (q Quaternion) exp() Quaternion

fn (Quaternion) inverse #

fn (q Quaternion) inverse() Quaternion

fn (Quaternion) is_finite #

fn (q Quaternion) is_finite() bool

fn (Quaternion) is_greater #

fn (q1 Quaternion) is_greater(q2 Quaternion) bool

fn (Quaternion) is_greaterequal #

fn (q1 Quaternion) is_greaterequal(q2 Quaternion) bool

fn (Quaternion) is_inf #

fn (q Quaternion) is_inf() bool

fn (Quaternion) is_less #

fn (q1 Quaternion) is_less(q2 Quaternion) bool

fn (Quaternion) is_lessequal #

fn (q1 Quaternion) is_lessequal(q2 Quaternion) bool

fn (Quaternion) is_nan #

fn (q Quaternion) is_nan() bool

fn (Quaternion) is_zero #

fn (q Quaternion) is_zero() bool

fn (Quaternion) lerp #

fn (start Quaternion) lerp(end Quaternion, tau f64) Quaternion

fn (Quaternion) log #

fn (q Quaternion) log() Quaternion

fn (Quaternion) multiply #

fn (q1 Quaternion) multiply(q2 Quaternion) Quaternion

fn (Quaternion) nlerp #

fn (start Quaternion) nlerp(end Quaternion, tau f64) Quaternion

fn (Quaternion) norm #

fn (q Quaternion) norm() f64

fn (Quaternion) normalized #

fn (q Quaternion) normalized() Quaternion

fn (Quaternion) opposite #

fn (q Quaternion) opposite() Quaternion

fn (Quaternion) parity_antisymmetric_part #

fn (q Quaternion) parity_antisymmetric_part() Quaternion

fn (Quaternion) parity_conjugate #

fn (q Quaternion) parity_conjugate() Quaternion

fn (Quaternion) parity_symmetric_part #

fn (q Quaternion) parity_symmetric_part() Quaternion

fn (Quaternion) pow #

fn (q Quaternion) pow(p Quaternion) Quaternion

fn (Quaternion) rotation_chordal_distance #

fn (q1 Quaternion) rotation_chordal_distance(q2 Quaternion) f64

fn (Quaternion) rotation_intrinsic_distance #

fn (q1 Quaternion) rotation_intrinsic_distance(q2 Quaternion) f64

fn (Quaternion) rotor_chordal_distance #

fn (q1 Quaternion) rotor_chordal_distance(q2 Quaternion) f64

fn (Quaternion) rotor_intrinsic_distance #

fn (q1 Quaternion) rotor_intrinsic_distance(q2 Quaternion) f64

fn (Quaternion) scalar_add #

fn (q Quaternion) scalar_add(s f64) Quaternion

fn (Quaternion) scalar_divide #

fn (q Quaternion) scalar_divide(s f64) Quaternion

fn (Quaternion) scalar_multiply #

fn (q Quaternion) scalar_multiply(s f64) Quaternion

fn (Quaternion) scalar_pow #

fn (q Quaternion) scalar_pow(s f64) Quaternion

fn (Quaternion) scalar_subtract #

fn (q Quaternion) scalar_subtract(s f64) Quaternion

fn (Quaternion) slerp #

fn (start Quaternion) slerp(end Quaternion, tau f64) Quaternion

fn (Quaternion) sqrt #

fn (q Quaternion) sqrt() Quaternion

fn (Quaternion) squad #

fn (qi Quaternion) squad(taui f64, ai Quaternion, bip1 Quaternion, qip1 Quaternion) Quaternion

fn (Quaternion) str #

fn (q Quaternion) str() string

To String method w + xi + yj + zk

fn (Quaternion) subtract #

fn (q1 Quaternion) subtract(q2 Quaternion) Quaternion

fn (Quaternion) x_parity_antisymmetric_part #

fn (q Quaternion) x_parity_antisymmetric_part() Quaternion

fn (Quaternion) x_parity_conjugate #

fn (q Quaternion) x_parity_conjugate() Quaternion

fn (Quaternion) x_parity_symmetric_part #

fn (q Quaternion) x_parity_symmetric_part() Quaternion

fn (Quaternion) y_parity_antisymmetric_part #

fn (q Quaternion) y_parity_antisymmetric_part() Quaternion

fn (Quaternion) y_parity_conjugate #

fn (q Quaternion) y_parity_conjugate() Quaternion

fn (Quaternion) y_parity_symmetric_part #

fn (q Quaternion) y_parity_symmetric_part() Quaternion

fn (Quaternion) z_parity_antisymmetric_part #

fn (q Quaternion) z_parity_antisymmetric_part() Quaternion

fn (Quaternion) z_parity_conjugate #

fn (q Quaternion) z_parity_conjugate() Quaternion

fn (Quaternion) z_parity_symmetric_part #

fn (q Quaternion) z_parity_symmetric_part() Quaternion