pub struct Vec2f { /* private fields */ }
Implementations
sourceimpl Vec2f
impl Vec2f
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn round(self) -> Self
pub fn trunc(self) -> Self
pub fn fract(self) -> Self
pub fn abs(self) -> Self
pub fn signum(self) -> Self
pub fn powf(self, n: f32) -> Self
pub fn sqrt(self) -> Self
pub fn exp(self) -> Self
pub fn exp2(self) -> Self
pub fn ln(self) -> Self
pub fn log(self, base: f32) -> Self
pub fn log2(self) -> Self
pub fn log10(self) -> Self
pub fn cbrt(self) -> Self
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn sin_cos(self) -> (Self, Self)
pub fn lerp(self, rhs: Self, s: f32) -> Self
pub fn lerp_vec(self, rhs: Self, s: Self) -> Self
pub fn is_nan(self) -> bool
pub fn is_infinite(self) -> bool
pub fn is_finite(self) -> bool
pub fn recip(self) -> Self
pub fn max(self, rhs: Self) -> Self
pub fn min(self, rhs: Self) -> Self
pub fn clamp(self, min: Self, max: Self) -> Self
pub fn saturate(self) -> Self
pub fn min_element(self) -> f32
pub fn max_element(self) -> f32
sourceimpl Vec2f
impl Vec2f
pub fn dot(self, rhs: Self) -> f32
pub fn cross(self, rhs: Self) -> f32
pub fn length(self) -> f32
pub fn length_squared(self) -> f32
pub fn length_recip(self) -> f32
pub fn distance(self, rhs: Self) -> f32
pub fn distance_squared(self, rhs: Self) -> f32
pub fn normalize(self) -> Self
pub fn try_normalize(self) -> Option<Self>
pub fn normalize_or_zero(self) -> Self
pub fn is_normalized(self) -> bool
pub fn angle_between(self, rhs: Self) -> f32
sourceimpl Vec2f
impl Vec2f
pub fn x(self) -> f32
pub fn y(self) -> f32
pub fn xx(self) -> Self
pub fn xy(self) -> Self
pub fn yx(self) -> Self
pub fn yy(self) -> Self
pub fn xxx(self) -> Vec3f
pub fn xxy(self) -> Vec3f
pub fn xyx(self) -> Vec3f
pub fn xyy(self) -> Vec3f
pub fn yxx(self) -> Vec3f
pub fn yxy(self) -> Vec3f
pub fn yyx(self) -> Vec3f
pub fn yyy(self) -> Vec3f
pub fn xxxx(self) -> Vec4f
pub fn xxxy(self) -> Vec4f
pub fn xxyx(self) -> Vec4f
pub fn xxyy(self) -> Vec4f
pub fn yxxx(self) -> Vec4f
pub fn yxxy(self) -> Vec4f
pub fn yxyx(self) -> Vec4f
pub fn yxyy(self) -> Vec4f
Trait Implementations
sourceimpl AddAssign<Vec2f> for Vec2f
impl AddAssign<Vec2f> for Vec2f
sourcefn add_assign(&mut self, rhs: Vec2f)
fn add_assign(&mut self, rhs: Vec2f)
Performs the +=
operation. Read more
sourceimpl AddAssign<f32> for Vec2f
impl AddAssign<f32> for Vec2f
sourcefn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
Performs the +=
operation. Read more
sourceimpl DivAssign<Vec2f> for Vec2f
impl DivAssign<Vec2f> for Vec2f
sourcefn div_assign(&mut self, rhs: Vec2f)
fn div_assign(&mut self, rhs: Vec2f)
Performs the /=
operation. Read more
sourceimpl DivAssign<f32> for Vec2f
impl DivAssign<f32> for Vec2f
sourcefn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the /=
operation. Read more
sourceimpl MulAssign<Vec2f> for Vec2f
impl MulAssign<Vec2f> for Vec2f
sourcefn mul_assign(&mut self, rhs: Vec2f)
fn mul_assign(&mut self, rhs: Vec2f)
Performs the *=
operation. Read more
sourceimpl MulAssign<f32> for Vec2f
impl MulAssign<f32> for Vec2f
sourcefn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the *=
operation. Read more
sourceimpl SubAssign<Vec2f> for Vec2f
impl SubAssign<Vec2f> for Vec2f
sourcefn sub_assign(&mut self, rhs: Vec2f)
fn sub_assign(&mut self, rhs: Vec2f)
Performs the -=
operation. Read more
sourceimpl SubAssign<f32> for Vec2f
impl SubAssign<f32> for Vec2f
sourcefn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
Performs the -=
operation. Read more
impl Copy for Vec2f
impl StructuralPartialEq for Vec2f
Auto Trait Implementations
impl RefUnwindSafe for Vec2f
impl Send for Vec2f
impl Sync for Vec2f
impl Unpin for Vec2f
impl UnwindSafe for Vec2f
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more