#[repr(C)]pub struct Vector4 {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
§w: f32
Implementations§
source§impl Vector4
impl Vector4
pub const fn new(x: f32, y: f32, z: f32, w: f32) -> Vector4
pub const fn zero() -> Vector4
pub const fn unit_x() -> Vector4
pub const fn unit_y() -> Vector4
pub const fn unit_z() -> Vector4
pub const fn unit_w() -> Vector4
sourcepub fn distance_sq(lhs: &Vector4, rhs: &Vector4) -> f32
pub fn distance_sq(lhs: &Vector4, rhs: &Vector4) -> f32
Compute the squared distance between two vectors
sourcepub fn normalized(&self) -> Vector4
pub fn normalized(&self) -> Vector4
Produce a normalized copy of the vector
Trait Implementations§
impl Copy for Vector4
Auto Trait Implementations§
impl RefUnwindSafe for Vector4
impl Send for Vector4
impl Sync for Vector4
impl Unpin for Vector4
impl UnwindSafe for Vector4
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