Expand description
Quaternion; used for rotations.
Let’s give it up for Hamilton.
Fields
a: f32
b: f32
c: f32
d: f32
Implementations
impl Quat
impl Quat
pub fn get_angle_with(&self, other: Quat) -> f32
pub fn from_slerp(n: Quat, m: Quat, t: f32) -> Quat
pub fn from_axis_angle(axis: Vec3, angle: f32) -> Quat
pub fn from_axis_angle(axis: Vec3, angle: f32) -> Quat
Creates a Quat
from a given rotation axis and angle (in radians)
pub fn rotation_to(a: Vec3, b: Vec3) -> Quat
pub fn rotation_to(a: Vec3, b: Vec3) -> Quat
pub fn normalized(&mut self) -> Quat
pub fn rotate_vec(&self, a: Vec3) -> Vec3
pub fn rotate_vec(&self, a: Vec3) -> Vec3
Transforms a Vec3
by rotating it
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Quat
impl UnwindSafe for Quat
Blanket Implementations
Mutably borrows from an owned value. Read more