#[repr(C)]pub struct Vector3 {
pub x: f32,
pub y: f32,
pub z: f32,
}Fields§
§x: f32§y: f32§z: f32Implementations§
Source§impl Vector3
impl Vector3
Sourcepub fn new(x: f32, y: f32, z: f32) -> Vector3
pub fn new(x: f32, y: f32, z: f32) -> Vector3
Creates a vector from its x, y, and z components.
Sourcepub fn length_squared(&self) -> f32
pub fn length_squared(&self) -> f32
Returns the squared length of the vector, avoiding the square root
computed by length.
Sourcepub fn distance_squared(&self, value: &Vector3) -> f32
pub fn distance_squared(&self, value: &Vector3) -> f32
Returns the squared distance between the points self and value.
Trait Implementations§
impl Copy for Vector3
impl StructuralPartialEq 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 UnsafeUnpin 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