#[repr(C)]pub struct Vec3 {
pub x: f32,
pub y: f32,
pub z: f32,
}
Expand description
Single-precision 3D vector.
Fields§
§x: f32
§y: f32
§z: f32
Implementations§
Trait Implementations§
Source§impl AddAssign for Vec3
impl AddAssign for Vec3
Source§fn add_assign(&mut self, rhs: Vec3)
fn add_assign(&mut self, rhs: Vec3)
Performs the
+=
operation. Read moreSource§impl ApproxEq for Vec3
impl ApproxEq for Vec3
Source§fn default_epsilon() -> <Vec3 as ApproxEq>::Epsilon
fn default_epsilon() -> <Vec3 as ApproxEq>::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn default_max_relative() -> <Vec3 as ApproxEq>::Epsilon
fn default_max_relative() -> <Vec3 as ApproxEq>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Vec3,
epsilon: <Vec3 as ApproxEq>::Epsilon,
max_relative: <Vec3 as ApproxEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &Vec3, epsilon: <Vec3 as ApproxEq>::Epsilon, max_relative: <Vec3 as ApproxEq>::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn ulps_eq(
&self,
other: &Vec3,
epsilon: <Vec3 as ApproxEq>::Epsilon,
max_ulps: u32,
) -> bool
fn ulps_eq( &self, other: &Vec3, epsilon: <Vec3 as ApproxEq>::Epsilon, max_ulps: u32, ) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
Source§impl DivAssign<f32> for Vec3
impl DivAssign<f32> for Vec3
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/=
operation. Read moreSource§impl MulAssign<f32> for Vec3
impl MulAssign<f32> for Vec3
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moreSource§impl SubAssign for Vec3
impl SubAssign for Vec3
Source§fn sub_assign(&mut self, rhs: Vec3)
fn sub_assign(&mut self, rhs: Vec3)
Performs the
-=
operation. Read moreimpl Copy for Vec3
impl StructuralPartialEq for Vec3
Auto Trait Implementations§
impl Freeze for Vec3
impl RefUnwindSafe for Vec3
impl Send for Vec3
impl Sync for Vec3
impl Unpin for Vec3
impl UnwindSafe for Vec3
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