[−][src]Struct hektor::Vec2
Two-dimensional vector: x
and y
.
Internally, this is two f32
values.
Methods
impl Vec2
[src]
pub fn x(self) -> f32
[src]
x
component
pub fn x_mut(&mut self) -> &mut f32
[src]
x
component unique reference
pub fn y(self) -> f32
[src]
y
component
pub fn y_mut(&mut self) -> &mut f32
[src]
y
component unique reference
pub fn xx(self) -> Self
[src]
Swizzle: xx
pub fn xy(self) -> Self
[src]
Swizzle: xy
pub fn yx(self) -> Self
[src]
Swizzle: yx
pub fn yy(self) -> Self
[src]
Swizzle: yy
pub fn abs(self) -> Self
[src]
Component-wise absolute value.
Trait Implementations
impl CanAbs for Vec2
[src]
impl Debug for Vec2
[src]
impl Copy for Vec2
[src]
impl From<[f32; 2]> for Vec2
[src]
impl From<(f32, f32)> for Vec2
[src]
impl Clone for Vec2
[src]
fn clone(&self) -> Vec2
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Vec2
[src]
impl Pod for Vec2
[src]
impl Zeroable for Vec2
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,