Struct Vector3
#[repr(C)]pub struct Vector3 {
pub X: f32,
pub Y: f32,
pub Z: f32,
}
Fields§
§X: f32
§Y: f32
§Z: f32
Implementations§
§impl Vector3
impl Vector3
pub fn new(X: f32, Y: f32, Z: f32) -> Self
pub fn zero() -> Self
pub fn one() -> Self
pub fn unit_x() -> Self
pub fn unit_y() -> Self
pub fn unit_z() -> Self
pub fn dot(&self, rhs: &Self) -> f32
pub fn length_squared(&self) -> f32
pub fn length(&self) -> f32
pub fn distance(&self, value: &Self) -> f32
pub fn distance_squared(&self, value: &Self) -> f32
pub fn normalize(&self) -> Self
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 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