pub trait QuaternionOps<T>: Copy {
    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 normalize(self) -> Self;
    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

self + rhs

self - rhs

s * self

s * self + b

self ∘ rhs

self ∘ b + c

-self

self * rhs

Implementors