#[repr(C)]pub struct Vector3 {
pub x: f32,
pub y: f32,
pub z: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
Implementations§
Source§impl Vector3
impl Vector3
pub const fn new(x: f32, y: f32, z: f32) -> Vector3
pub const fn zero() -> Vector3
pub const fn unit_x() -> Vector3
pub const fn unit_y() -> Vector3
pub const fn unit_z() -> Vector3
Sourcepub fn distance_sq(lhs: &Vector3, rhs: &Vector3) -> f32
pub fn distance_sq(lhs: &Vector3, rhs: &Vector3) -> f32
Compute the squared distance between two vectors
Sourcepub fn normalized(&self) -> Vector3
pub fn normalized(&self) -> Vector3
Produce a normalized copy of the vector
Trait Implementations§
Source§impl Mul<Vector3> for Quaternion
impl Mul<Vector3> for Quaternion
impl Copy for Vector3
Auto Trait Implementations§
impl Freeze for Vector3
impl RefUnwindSafe for Vector3
impl Send for Vector3
impl Sync for Vector3
impl Unpin for Vector3
impl UnwindSafe for Vector3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more