Trait quaternion_core::QuaternionOps
source · pub trait QuaternionOps<T>: Copy {
// Required methods
fn sum(self) -> T;
fn add(self, rhs: Self) -> Self;
fn sub(self, rhs: Self) -> Self;
fn scale(self, s: T) -> Self;
fn scale_add(self, s: T, b: Self) -> Self;
fn hadamard(self, rhs: Self) -> Self;
fn hadamard_add(self, b: Self, c: Self) -> Self;
fn norm(self) -> T;
fn negate(self) -> Self;
fn mul(self, rhs: Self) -> Quaternion<T>;
fn inv(self) -> Self;
fn exp(self) -> Quaternion<T>;
}
Expand description
This trait provides operations common to Quaternions and Pure Quaternions (Vector3).
Required Methods§
fn sum(self) -> T
sourcefn hadamard_add(self, b: Self, c: Self) -> Self
fn hadamard_add(self, b: Self, c: Self) -> Self
self ∘ b + c
fn norm(self) -> T
sourcefn mul(self, rhs: Self) -> Quaternion<T>
fn mul(self, rhs: Self) -> Quaternion<T>
self * rhs