[−][src]Struct gee::Vector
Fields
dx: T
dy: T
Methods
impl<T> Vector<T>
[src]
impl<T> Vector<T>
pub fn new<U: Into<T>>(dx: U, dy: U) -> Self | [src] |
pub fn as_ref(&self) -> Vector<&T> | [src] |
pub fn as_mut(&mut self) -> Vector<&mut T> | [src] |
pub fn to_size(self) -> Size<T> | [src] |
pub fn dot_product<RHS, A>(self, rhs: Vector<RHS>) -> A::Output where | [src] |
pub fn magnitude_squared<A>(self) -> A::Output where | [src] |
pub fn magnitude<A>(self) -> A::Output where | [src] |
pub fn normalized<A>(self) -> Vector<<T as Div<A::Output>>::Output> where | [src] |
impl<T: Neg<Output = T>> Vector<T>
[src]
impl<T: Neg<Output = T>> Vector<T>
pub fn perpendicular(self) -> Self | [src] |
Trait Implementations
impl<T: Eq> Eq for Vector<T>
[src]
impl<T: Eq> Eq for Vector<T>
impl<T: PartialOrd> PartialOrd<Vector<T>> for Vector<T>
[src]
impl<T: PartialOrd> PartialOrd<Vector<T>> for Vector<T>
fn partial_cmp(&self, other: &Vector<T>) -> Option<Ordering> | [src] |
fn lt(&self, other: &Vector<T>) -> bool | [src] |
fn le(&self, other: &Vector<T>) -> bool | [src] |
fn gt(&self, other: &Vector<T>) -> bool | [src] |
fn ge(&self, other: &Vector<T>) -> bool | [src] |
impl<T: Copy> Copy for Vector<T>
[src]
impl<T: Copy> Copy for Vector<T>
impl<T: Default> Default for Vector<T>
[src]
impl<T: Default> Default for Vector<T>
impl<T: PartialEq> PartialEq<Vector<T>> for Vector<T>
[src]
impl<T: PartialEq> PartialEq<Vector<T>> for Vector<T>
impl<T: Clone> Clone for Vector<T>
[src]
impl<T: Clone> Clone for Vector<T>
fn clone(&self) -> Vector<T> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl<T: Ord> Ord for Vector<T>
[src]
impl<T: Ord> Ord for Vector<T>
fn cmp(&self, other: &Vector<T>) -> Ordering | [src] |
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
impl<T: Debug> Debug for Vector<T>
[src]
impl<T: Debug> Debug for Vector<T>
impl<T: Hash> Hash for Vector<T>
[src]
impl<T: Hash> Hash for Vector<T>
fn hash<__HT: Hasher>(&self, state: &mut __HT) | [src] |
fn hash_slice<H>(data: &[Self], state: &mut H) where | 1.3.0 [src] |
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Add<RHS>, RHS> Add<Vector<RHS>> for Point<T>
[src]
impl<T: Add<RHS>, RHS> Add<Vector<RHS>> for Point<T>
type Output = Point<T::Output>
The resulting type after applying the +
operator.
fn add(self, rhs: Vector<RHS>) -> Self::Output | [src] |
impl<T: Add<RHS>, RHS: Copy> Add<Vector<RHS>> for Rect<T>
[src]
impl<T: Add<RHS>, RHS: Copy> Add<Vector<RHS>> for Rect<T>
type Output = Rect<T::Output>
The resulting type after applying the +
operator.
fn add(self, rhs: Vector<RHS>) -> Self::Output | [src] |
impl<T: Add<RHS, Output = Output>, RHS, Output> Add<Vector<RHS>> for Vector<T>
[src]
impl<T: Add<RHS, Output = Output>, RHS, Output> Add<Vector<RHS>> for Vector<T>
type Output = Vector<Output>
The resulting type after applying the +
operator.
fn add(self, rhs: Vector<RHS>) -> Self::Output | [src] |
impl<T: Sub<RHS>, RHS> Sub<Vector<RHS>> for Point<T>
[src]
impl<T: Sub<RHS>, RHS> Sub<Vector<RHS>> for Point<T>
type Output = Point<T::Output>
The resulting type after applying the -
operator.
fn sub(self, rhs: Vector<RHS>) -> Self::Output | [src] |
impl<T: Mul<RHS, Output = Output>, RHS: Copy, Output> Mul<RHS> for Vector<T>
[src]
impl<T: Mul<RHS, Output = Output>, RHS: Copy, Output> Mul<RHS> for Vector<T>
type Output = Vector<Output>
The resulting type after applying the *
operator.
fn mul(self, rhs: RHS) -> Self::Output | [src] |
impl<T: Div<RHS, Output = Output>, RHS: Copy, Output> Div<RHS> for Vector<T>
[src]
impl<T: Div<RHS, Output = Output>, RHS: Copy, Output> Div<RHS> for Vector<T>
type Output = Vector<Output>
The resulting type after applying the /
operator.
fn div(self, rhs: RHS) -> Self::Output | [src] |
impl<T: Rem<RHS, Output = Output>, RHS: Copy, Output> Rem<RHS> for Vector<T>
[src]
impl<T: Rem<RHS, Output = Output>, RHS: Copy, Output> Rem<RHS> for Vector<T>
type Output = Vector<Output>
The resulting type after applying the %
operator.
fn rem(self, rhs: RHS) -> Self::Output | [src] |
impl<T: AddAssign<RHS>, RHS> AddAssign<Vector<RHS>> for Point<T>
[src]
impl<T: AddAssign<RHS>, RHS> AddAssign<Vector<RHS>> for Point<T>
fn add_assign(&mut self, rhs: Vector<RHS>) | [src] |
impl<T: AddAssign<RHS>, RHS: Copy> AddAssign<Vector<RHS>> for Rect<T>
[src]
impl<T: AddAssign<RHS>, RHS: Copy> AddAssign<Vector<RHS>> for Rect<T>
fn add_assign(&mut self, rhs: Vector<RHS>) | [src] |
impl<T: AddAssign<RHS>, RHS> AddAssign<Vector<RHS>> for Vector<T>
[src]
impl<T: AddAssign<RHS>, RHS> AddAssign<Vector<RHS>> for Vector<T>
fn add_assign(&mut self, rhs: Vector<RHS>) | [src] |
impl<T: SubAssign<RHS>, RHS> SubAssign<Vector<RHS>> for Point<T>
[src]
impl<T: SubAssign<RHS>, RHS> SubAssign<Vector<RHS>> for Point<T>
fn sub_assign(&mut self, rhs: Vector<RHS>) | [src] |
impl<T: MulAssign<RHS>, RHS: Copy> MulAssign<RHS> for Vector<T>
[src]
impl<T: MulAssign<RHS>, RHS: Copy> MulAssign<RHS> for Vector<T>
fn mul_assign(&mut self, rhs: RHS) | [src] |
impl<T: DivAssign<RHS>, RHS: Copy> DivAssign<RHS> for Vector<T>
[src]
impl<T: DivAssign<RHS>, RHS: Copy> DivAssign<RHS> for Vector<T>
fn div_assign(&mut self, rhs: RHS) | [src] |
impl<T: RemAssign<RHS>, RHS: Copy> RemAssign<RHS> for Vector<T>
[src]
impl<T: RemAssign<RHS>, RHS: Copy> RemAssign<RHS> for Vector<T>
fn rem_assign(&mut self, rhs: RHS) | [src] |
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |