[−][src]Struct torophy::math::vec2::Vec2
Fields
x: f32
y: f32
Implementations
impl Vec2
[src]
pub fn zero() -> Vec2
[src]
pub fn xy(x: f32, y: f32) -> Vec2
[src]
pub fn x(x: f32) -> Vec2
[src]
pub fn y(y: f32) -> Vec2
[src]
pub fn from_angle(angle: f32) -> Vec2
[src]
pub fn clear(&mut self)
[src]
pub fn length(&self) -> f32
[src]
pub fn square_length(&self) -> f32
[src]
Trait Implementations
impl Add<Vec2> for Vec2
[src]
type Output = Vec2
The resulting type after applying the +
operator.
fn add(self, other: Vec2) -> Vec2
[src]
impl AddAssign<Vec2> for Vec2
[src]
fn add_assign(&mut self, other: Vec2)
[src]
impl Clone for Vec2
[src]
impl Copy for Vec2
[src]
impl Debug for Vec2
[src]
impl Div<f32> for Vec2
[src]
type Output = Vec2
The resulting type after applying the /
operator.
fn div(self, scalar: f32) -> Vec2
[src]
impl DivAssign<f32> for Vec2
[src]
fn div_assign(&mut self, scalar: f32)
[src]
impl Mul<Vec2> for Vec2
[src]
type Output = f32
The resulting type after applying the *
operator.
fn mul(self, other: Vec2) -> f32
[src]
impl Mul<f32> for Vec2
[src]
type Output = Vec2
The resulting type after applying the *
operator.
fn mul(self, scalar: f32) -> Vec2
[src]
impl MulAssign<f32> for Vec2
[src]
fn mul_assign(&mut self, scalar: f32)
[src]
impl Neg for Vec2
[src]
impl PartialEq<Vec2> for Vec2
[src]
impl StructuralPartialEq for Vec2
[src]
impl Sub<Vec2> for Vec2
[src]
type Output = Vec2
The resulting type after applying the -
operator.
fn sub(self, other: Vec2) -> Vec2
[src]
impl SubAssign<Vec2> for Vec2
[src]
fn sub_assign(&mut self, other: Vec2)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec2
impl Send for Vec2
impl Sync for Vec2
impl Unpin for Vec2
impl UnwindSafe for Vec2
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,