[−][src]Struct fluff::vector::vector2::Vector2
A vector with x and y components derives traits: Default, Debug, PartialEq, Eq, Copy, Clone, Hash
Fields
x: T
y: T
Trait Implementations
impl<T: Component> Add<Vector2<T>> for Vector2<T>
[src]
type Output = Vector2<T>
The resulting type after applying the +
operator.
fn add(self, rhs: Vector2<T>) -> Vector2<T>
[src]
Add a Vector2 to another Vector2
impl<T: Component> Base<T> for Vector2<T>
[src]
fn magnitude(&self) -> T
[src]
Return the magnitude of the vector, sqrt(x^2 + y^2)
fn normalize(&mut self) -> Vector2<T>
[src]
Shrink vector to have magnitude of 1
fn dot(&self)
[src]
impl<T: Clone + Component> Clone for Vector2<T>
[src]
impl<T: Copy + Component> Copy for Vector2<T>
[src]
impl<T: Debug + Component> Debug for Vector2<T>
[src]
impl<T: Default + Component> Default for Vector2<T>
[src]
impl<T: Component + Display> Display for Vector2<T>
[src]
impl<T: Component> Div<T> for Vector2<T>
[src]
type Output = Vector2<T>
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Vector2<T>
[src]
Divide a Vector2 by a scalar
impl<T: Eq + Component> Eq for Vector2<T>
[src]
impl<T: Hash + Component> Hash for Vector2<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Component> Mul<T> for Vector2<T>
[src]
type Output = Vector2<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Vector2<T>
[src]
Multiply a Vector2 by a scalar
impl<T: Component + Neg<Output = T>> Neg for Vector2<T>
[src]
type Output = Vector2<T>
The resulting type after applying the -
operator.
fn neg(self) -> Vector2<T>
[src]
Reverse the sign of the vector's components
impl<T: PartialEq + Component> PartialEq<Vector2<T>> for Vector2<T>
[src]
impl<T: Component> StructuralEq for Vector2<T>
[src]
impl<T: Component> StructuralPartialEq for Vector2<T>
[src]
impl<T: Component> Sub<Vector2<T>> for Vector2<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Vector2<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Vector2<T> where
T: Send,
T: Send,
impl<T> Sync for Vector2<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Vector2<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vector2<T> where
T: UnwindSafe,
T: UnwindSafe,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,