[−][src]Struct vec_arith::Vec2
Methods
impl Vec2<f32>
[src]
impl Vec2<f32>
pub fn abs(self) -> Self | [src] |
pub fn powf(self, rhs: Self) -> Self | [src] |
pub fn powi(self, rhs: Vec2<i32>) -> Self | [src] |
pub fn sqrt(self) -> Self | [src] |
pub fn cbrt(self) -> Self | [src] |
pub fn log(self, rhs: Self) -> Self | [src] |
pub fn len(self) -> f32 | [src] |
pub fn normalize(self, len: f32) -> Self | [src] |
pub fn distance(self, other: Self) -> f32 | [src] |
pub fn angle(self, other: Self) -> f32 | [src] |
impl Vec2<f64>
[src]
impl Vec2<f64>
pub fn abs(self) -> Self | [src] |
pub fn powf(self, rhs: Self) -> Self | [src] |
pub fn powi(self, rhs: Vec2<i32>) -> Self | [src] |
pub fn sqrt(self) -> Self | [src] |
pub fn cbrt(self) -> Self | [src] |
pub fn log(self, rhs: Self) -> Self | [src] |
pub fn len(self) -> f64 | [src] |
pub fn normalize(self, len: f64) -> Self | [src] |
pub fn distance(self, other: Self) -> f64 | [src] |
pub fn angle(self, other: Self) -> f64 | [src] |
impl<T: PartialOrd + Copy> Vec2<T>
[src]
impl<T: PartialOrd + Copy> Vec2<T>
pub fn min(self, other: Self) -> Self | [src] |
pub fn mins(self, other: T) -> Self | [src] |
pub fn max(self, other: Self) -> Self | [src] |
pub fn maxs(self, other: T) -> Self | [src] |
pub fn clamp(self, lower: Self, upper: Self) -> Self | [src] |
pub fn clamps(self, lower: T, upper: T) -> Self | [src] |
impl<T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy> Vec2<T>
[src]
impl<T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy> Vec2<T>
Trait Implementations
impl<T: Copy> From<T> for Vec2<T>
[src]
impl<T: Copy> From<T> for Vec2<T>
impl<T: Copy> From<[T; 2]> for Vec2<T>
[src]
impl<T: Copy> From<[T; 2]> for Vec2<T>
impl<T> From<(T, T)> for Vec2<T>
[src]
impl<T> From<(T, T)> for Vec2<T>
impl<T: PartialOrd> PartialOrd<Vec2<T>> for Vec2<T>
[src]
impl<T: PartialOrd> PartialOrd<Vec2<T>> for Vec2<T>
fn partial_cmp(&self, other: &Vec2<T>) -> Option<Ordering> | [src] |
fn lt(&self, other: &Vec2<T>) -> bool | [src] |
fn le(&self, other: &Vec2<T>) -> bool | [src] |
fn gt(&self, other: &Vec2<T>) -> bool | [src] |
fn ge(&self, other: &Vec2<T>) -> bool | [src] |
impl<T: Copy> Copy for Vec2<T>
[src]
impl<T: Copy> Copy for Vec2<T>
impl<T: PartialEq> PartialEq<Vec2<T>> for Vec2<T>
[src]
impl<T: PartialEq> PartialEq<Vec2<T>> for Vec2<T>
impl<T: Clone> Clone for Vec2<T>
[src]
impl<T: Clone> Clone for Vec2<T>
fn clone(&self) -> Vec2<T> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Vec2<T>
[src]
impl<T: Debug> Debug for Vec2<T>
impl<T: Add<Output = U>, U> Add<Vec2<T>> for Vec2<T>
[src]
impl<T: Add<Output = U>, U> Add<Vec2<T>> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output | [src] |
impl<T: Sub<Output = U>, U> Sub<Vec2<T>> for Vec2<T>
[src]
impl<T: Sub<Output = U>, U> Sub<Vec2<T>> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output | [src] |
impl<T: Mul<Output = U>, U> Mul<Vec2<T>> for Vec2<T>
[src]
impl<T: Mul<Output = U>, U> Mul<Vec2<T>> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output | [src] |
impl<T: Mul<Output = U> + Copy, U> Mul<T> for Vec2<T>
[src]
impl<T: Mul<Output = U> + Copy, U> Mul<T> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output | [src] |
impl<T: Div<Output = U>, U> Div<Vec2<T>> for Vec2<T>
[src]
impl<T: Div<Output = U>, U> Div<Vec2<T>> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output | [src] |
impl<T: Div<Output = U> + Copy, U> Div<T> for Vec2<T>
[src]
impl<T: Div<Output = U> + Copy, U> Div<T> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output | [src] |
impl<T: Rem<Output = U>, U> Rem<Vec2<T>> for Vec2<T>
[src]
impl<T: Rem<Output = U>, U> Rem<Vec2<T>> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the %
operator.
fn rem(self, rhs: Self) -> Self::Output | [src] |
impl<T: Rem<Output = U> + Copy, U> Rem<T> for Vec2<T>
[src]
impl<T: Rem<Output = U> + Copy, U> Rem<T> for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the %
operator.
fn rem(self, rhs: T) -> Self::Output | [src] |
impl<T: Neg<Output = U>, U> Neg for Vec2<T>
[src]
impl<T: Neg<Output = U>, U> Neg for Vec2<T>
type Output = Vec2<U>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output | [src] |
impl<T: AddAssign> AddAssign<Vec2<T>> for Vec2<T>
[src]
impl<T: AddAssign> AddAssign<Vec2<T>> for Vec2<T>
fn add_assign(&mut self, rhs: Self) | [src] |
impl<T: SubAssign> SubAssign<Vec2<T>> for Vec2<T>
[src]
impl<T: SubAssign> SubAssign<Vec2<T>> for Vec2<T>
fn sub_assign(&mut self, rhs: Self) | [src] |
impl<T: MulAssign> MulAssign<Vec2<T>> for Vec2<T>
[src]
impl<T: MulAssign> MulAssign<Vec2<T>> for Vec2<T>
fn mul_assign(&mut self, rhs: Self) | [src] |
impl<T: MulAssign + Copy> MulAssign<T> for Vec2<T>
[src]
impl<T: MulAssign + Copy> MulAssign<T> for Vec2<T>
fn mul_assign(&mut self, rhs: T) | [src] |
impl<T: DivAssign> DivAssign<Vec2<T>> for Vec2<T>
[src]
impl<T: DivAssign> DivAssign<Vec2<T>> for Vec2<T>
fn div_assign(&mut self, rhs: Self) | [src] |
impl<T: DivAssign + Copy> DivAssign<T> for Vec2<T>
[src]
impl<T: DivAssign + Copy> DivAssign<T> for Vec2<T>
fn div_assign(&mut self, rhs: T) | [src] |
impl<T: RemAssign> RemAssign<Vec2<T>> for Vec2<T>
[src]
impl<T: RemAssign> RemAssign<Vec2<T>> for Vec2<T>
fn rem_assign(&mut self, rhs: Self) | [src] |
impl<T: RemAssign + Copy> RemAssign<T> for Vec2<T>
[src]
impl<T: RemAssign + Copy> RemAssign<T> for Vec2<T>
fn rem_assign(&mut self, rhs: T) | [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] |