Expand description
A 3D vector
Implementations
Trait Implementations
sourceimpl<T: Copy + NumAssign> From<Quaternion<T>> for Vec3<T>
impl<T: Copy + NumAssign> From<Quaternion<T>> for Vec3<T>
sourcefn from(q: Quaternion<T>) -> Self
fn from(q: Quaternion<T>) -> Self
Creates a Vec3
from a Quaternion
by dropping the w
component.
Examples
let v = Vec3::from(Quaternion::<i32>::from_slice(&[2, 3, 4, 5]));
assert_eq!(*v.as_ref(), [2, 3, 4]);