[−][src]Struct fumarole::math::Vec2
Fields
x: I
y: I
Methods
impl<I> Vec2<I>
[src]
impl Vec2<f32>
[src]
impl Vec2<f32>
[src]
pub fn magnitude(self) -> f32
[src]
pub fn magnitude_squared(self) -> f32
[src]
pub fn normalize(self) -> Vec2<f32>
[src]
pub fn from_radians(angle: f32) -> Vec2<f32>
[src]
pub fn dot(self, other: Self) -> f32
[src]
pub fn project(self, other: Self) -> Self
[src]
impl Vec2<f64>
[src]
pub fn magnitude(self) -> f64
[src]
pub fn magnitude_squared(self) -> f64
[src]
pub fn normalize(self) -> Vec2<f64>
[src]
pub fn from_radians(angle: f64) -> Vec2<f64>
[src]
pub fn dot(self, other: Self) -> f64
[src]
pub fn project(self, other: Self) -> Self
[src]
Trait Implementations
impl<I> Add<(I, I)> for Vec2<I> where
I: Add<I> + Copy,
<I as Add<I>>::Output: Into<I>,
[src]
I: Add<I> + Copy,
<I as Add<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the +
operator.
fn add(self, other: (I, I)) -> Self::Output
[src]
impl<I> Add<I> for Vec2<I> where
I: Add<I> + Copy,
<I as Add<I>>::Output: Into<I>,
[src]
I: Add<I> + Copy,
<I as Add<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the +
operator.
fn add(self, other: I) -> Self::Output
[src]
impl<I> Add<Vec2<I>> for Vec2<I> where
I: Add<I> + Copy,
<I as Add<I>>::Output: Into<I>,
[src]
I: Add<I> + Copy,
<I as Add<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the +
operator.
fn add(self, other: Vec2<I>) -> Self::Output
[src]
impl<I> AddAssign<(I, I)> for Vec2<I> where
I: AddAssign<I> + Copy,
[src]
I: AddAssign<I> + Copy,
fn add_assign(&mut self, other: (I, I))
[src]
impl<I> AddAssign<I> for Vec2<I> where
I: AddAssign<I> + Copy,
[src]
I: AddAssign<I> + Copy,
fn add_assign(&mut self, other: I)
[src]
impl<I> AddAssign<Vec2<I>> for Vec2<I> where
I: AddAssign<I> + Copy,
[src]
I: AddAssign<I> + Copy,
fn add_assign(&mut self, other: Vec2<I>)
[src]
impl<I: Clone> Clone for Vec2<I>
[src]
impl<I: Copy> Copy for Vec2<I>
[src]
impl<I: Debug> Debug for Vec2<I>
[src]
impl<I: Default> Default for Vec2<I>
[src]
impl<'de, I> Deserialize<'de> for Vec2<I> where
I: Deserialize<'de>,
[src]
I: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<I> Div<(I, I)> for Vec2<I> where
I: Div<I> + Copy,
<I as Div<I>>::Output: Into<I>,
[src]
I: Div<I> + Copy,
<I as Div<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the /
operator.
fn div(self, other: (I, I)) -> Self::Output
[src]
impl<I> Div<I> for Vec2<I> where
I: Div<I> + Copy,
<I as Div<I>>::Output: Into<I>,
[src]
I: Div<I> + Copy,
<I as Div<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the /
operator.
fn div(self, other: I) -> Self::Output
[src]
impl<I> Div<Vec2<I>> for Vec2<I> where
I: Div<I> + Copy,
<I as Div<I>>::Output: Into<I>,
[src]
I: Div<I> + Copy,
<I as Div<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the /
operator.
fn div(self, other: Vec2<I>) -> Self::Output
[src]
impl<I> DivAssign<(I, I)> for Vec2<I> where
I: DivAssign<I> + Copy,
[src]
I: DivAssign<I> + Copy,
fn div_assign(&mut self, other: (I, I))
[src]
impl<I> DivAssign<I> for Vec2<I> where
I: DivAssign<I> + Copy,
[src]
I: DivAssign<I> + Copy,
fn div_assign(&mut self, other: I)
[src]
impl<I> DivAssign<Vec2<I>> for Vec2<I> where
I: DivAssign<I> + Copy,
[src]
I: DivAssign<I> + Copy,
fn div_assign(&mut self, other: Vec2<I>)
[src]
impl<I: Eq> Eq for Vec2<I>
[src]
impl<I: Hash> Hash for Vec2<I>
[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<I> Into<[I; 2]> for Vec2<I>
[src]
impl<I> Mul<(I, I)> for Vec2<I> where
I: Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
[src]
I: Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the *
operator.
fn mul(self, other: (I, I)) -> Self::Output
[src]
impl<I> Mul<I> for Vec2<I> where
I: Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
[src]
I: Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the *
operator.
fn mul(self, other: I) -> Self::Output
[src]
impl<I> Mul<Mat2<I>> for Vec2<I> where
I: Add<I> + Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
<I as Add<I>>::Output: Into<I>,
[src]
I: Add<I> + Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
<I as Add<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the *
operator.
fn mul(self, other: Mat2<I>) -> Self::Output
[src]
impl<I> Mul<Vec2<I>> for Vec2<I> where
I: Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
[src]
I: Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the *
operator.
fn mul(self, other: Vec2<I>) -> Self::Output
[src]
impl<I> Mul<Vec2<I>> for Mat2<I> where
I: Add<I> + Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
<I as Add<I>>::Output: Into<I>,
[src]
I: Add<I> + Mul<I> + Copy,
<I as Mul<I>>::Output: Into<I>,
<I as Add<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the *
operator.
fn mul(self, other: Vec2<I>) -> Self::Output
[src]
impl<I> MulAssign<(I, I)> for Vec2<I> where
I: MulAssign<I> + Copy,
[src]
I: MulAssign<I> + Copy,
fn mul_assign(&mut self, other: (I, I))
[src]
impl<I> MulAssign<I> for Vec2<I> where
I: MulAssign<I> + Copy,
[src]
I: MulAssign<I> + Copy,
fn mul_assign(&mut self, other: I)
[src]
impl<I> MulAssign<Mat2<I>> for Vec2<I> where
Vec2<I>: Mul<Mat2<I>> + Clone,
<Vec2<I> as Mul<Mat2<I>>>::Output: Into<Vec2<I>>,
[src]
Vec2<I>: Mul<Mat2<I>> + Clone,
<Vec2<I> as Mul<Mat2<I>>>::Output: Into<Vec2<I>>,
fn mul_assign(&mut self, other: Mat2<I>)
[src]
impl<I> MulAssign<Vec2<I>> for Vec2<I> where
I: MulAssign<I> + Copy,
[src]
I: MulAssign<I> + Copy,
fn mul_assign(&mut self, other: Vec2<I>)
[src]
impl<I> Neg for Vec2<I> where
I: Neg,
[src]
I: Neg,
type Output = Vec2<<I as Neg>::Output>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<I: PartialEq> PartialEq<Vec2<I>> for Vec2<I>
[src]
impl<I> Serialize for Vec2<I> where
I: Serialize,
[src]
I: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<I> StructuralEq for Vec2<I>
[src]
impl<I> StructuralPartialEq for Vec2<I>
[src]
impl<I> Sub<(I, I)> for Vec2<I> where
I: Sub<I> + Copy,
<I as Sub<I>>::Output: Into<I>,
[src]
I: Sub<I> + Copy,
<I as Sub<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the -
operator.
fn sub(self, other: (I, I)) -> Self::Output
[src]
impl<I> Sub<I> for Vec2<I> where
I: Sub<I> + Copy,
<I as Sub<I>>::Output: Into<I>,
[src]
I: Sub<I> + Copy,
<I as Sub<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the -
operator.
fn sub(self, other: I) -> Self::Output
[src]
impl<I> Sub<Vec2<I>> for Vec2<I> where
I: Sub<I> + Copy,
<I as Sub<I>>::Output: Into<I>,
[src]
I: Sub<I> + Copy,
<I as Sub<I>>::Output: Into<I>,
type Output = Vec2<I>
The resulting type after applying the -
operator.
fn sub(self, other: Vec2<I>) -> Self::Output
[src]
impl<I> SubAssign<(I, I)> for Vec2<I> where
I: SubAssign<I> + Copy,
[src]
I: SubAssign<I> + Copy,
fn sub_assign(&mut self, other: (I, I))
[src]
impl<I> SubAssign<I> for Vec2<I> where
I: SubAssign<I> + Copy,
[src]
I: SubAssign<I> + Copy,
fn sub_assign(&mut self, other: I)
[src]
impl<I> SubAssign<Vec2<I>> for Vec2<I> where
I: SubAssign<I> + Copy,
[src]
I: SubAssign<I> + Copy,
fn sub_assign(&mut self, other: Vec2<I>)
[src]
Auto Trait Implementations
impl<I> RefUnwindSafe for Vec2<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I> Send for Vec2<I> where
I: Send,
I: Send,
impl<I> Sync for Vec2<I> where
I: Sync,
I: Sync,
impl<I> Unpin for Vec2<I> where
I: Unpin,
I: Unpin,
impl<I> UnwindSafe for Vec2<I> where
I: UnwindSafe,
I: 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> Content for T where
T: Copy,
[src]
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
[src]
F: FnOnce(&mut T) -> Result<(), E>,
fn get_elements_size() -> usize
[src]
fn to_void_ptr(&self) -> *const ()
[src]
fn ref_from_ptr(ptr: *mut (), size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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>,