Struct octoon_math::vec2::Vec2
source · pub struct Vec2<T> {
pub x: T,
pub y: T,
}
Fields
x: T
y: T
Implementations
sourceimpl<T> Vec2<T>where
T: Copy,
impl<T> Vec2<T>where
T: Copy,
pub fn to_tuple(&self) -> (T, T)
pub fn xx(&self) -> Self
pub fn xy(&self) -> Self
pub fn yx(&self) -> Self
pub fn yy(&self) -> Self
pub fn xxx(&self) -> Vec3<T>
pub fn xxy(&self) -> Vec3<T>
pub fn xyx(&self) -> Vec3<T>
pub fn xyy(&self) -> Vec3<T>
pub fn yxx(&self) -> Vec3<T>
pub fn yxy(&self) -> Vec3<T>
pub fn yyx(&self) -> Vec3<T>
pub fn yyy(&self) -> Vec3<T>
pub fn xxxx(&self) -> Vec4<T>
pub fn xxyx(&self) -> Vec4<T>
pub fn xyxx(&self) -> Vec4<T>
pub fn xyyx(&self) -> Vec4<T>
pub fn xxxy(&self) -> Vec4<T>
pub fn xxyy(&self) -> Vec4<T>
pub fn xyxy(&self) -> Vec4<T>
pub fn xyyy(&self) -> Vec4<T>
pub fn yxxx(&self) -> Vec4<T>
pub fn yxyx(&self) -> Vec4<T>
pub fn yyxx(&self) -> Vec4<T>
pub fn yyyx(&self) -> Vec4<T>
pub fn yxxy(&self) -> Vec4<T>
pub fn yxyy(&self) -> Vec4<T>
pub fn yyxy(&self) -> Vec4<T>
pub fn yyyy(&self) -> Vec4<T>
Trait Implementations
sourceimpl<T> AddAssign<Vec2<T>> for Vec2<T>where
T: AddAssign<T>,
impl<T> AddAssign<Vec2<T>> for Vec2<T>where
T: AddAssign<T>,
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresourceimpl<'de, T: Deserialize<'de> + Copy> Deserialize<'de> for Vec2<T>
impl<'de, T: Deserialize<'de> + Copy> Deserialize<'de> for Vec2<T>
sourcefn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T> DivAssign<T> for Vec2<T>where
T: DivAssign<T> + Copy,
impl<T> DivAssign<T> for Vec2<T>where
T: DivAssign<T> + Copy,
sourcefn div_assign(&mut self, s: T)
fn div_assign(&mut self, s: T)
Performs the
/=
operation. Read moresourceimpl<T> DivAssign<Vec2<T>> for Vec2<T>where
T: DivAssign<T>,
impl<T> DivAssign<Vec2<T>> for Vec2<T>where
T: DivAssign<T>,
sourcefn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moresourceimpl<T> Interpolation<T> for Vec2<T>where
T: Copy + One + Mul<Output = T> + Add<Output = T> + Sub<Output = T>,
impl<T> Interpolation<T> for Vec2<T>where
T: Copy + One + Mul<Output = T> + Add<Output = T> + Sub<Output = T>,
sourceimpl<T> Math for Vec2<T>where
T: Copy + Math,
impl<T> Math for Vec2<T>where
T: Copy + Math,
fn abs(self) -> Self
fn recip(self) -> Self
fn sqrt(self) -> Self
fn rsqrt(self) -> Self
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
fn sincos(self) -> (Self, Self)
fn acos(self) -> Self
fn asin(self) -> Self
fn atan(self) -> Self
fn exp(self) -> Self
fn exp2(self) -> Self
fn log(self, _rhs: Self) -> Self
fn log2(self) -> Self
fn log10(self) -> Self
fn to_radians(self) -> Self
fn to_degrees(self) -> Self
fn min(self, _rhs: Self) -> Self
fn max(self, _rhs: Self) -> Self
fn saturate(self) -> Self
fn snorm2unorm(self) -> Self
fn unorm2snorm(self) -> Self
fn clamp(self, minval: Self, maxval: Self) -> Self
sourceimpl<T> MulAssign<T> for Vec2<T>where
T: MulAssign<T> + Copy,
impl<T> MulAssign<T> for Vec2<T>where
T: MulAssign<T> + Copy,
sourcefn mul_assign(&mut self, s: T)
fn mul_assign(&mut self, s: T)
Performs the
*=
operation. Read moresourceimpl<T> MulAssign<Vec2<T>> for Vec2<T>where
T: MulAssign<T>,
impl<T> MulAssign<Vec2<T>> for Vec2<T>where
T: MulAssign<T>,
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moresourceimpl<T> SubAssign<Vec2<T>> for Vec2<T>where
T: SubAssign<T>,
impl<T> SubAssign<Vec2<T>> for Vec2<T>where
T: SubAssign<T>,
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl<T: Copy> Copy for Vec2<T>
impl<T: Eq> Eq for Vec2<T>
impl<T> StructuralEq for Vec2<T>
impl<T> StructuralPartialEq for Vec2<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Vec2<T>where
T: RefUnwindSafe,
impl<T> Send for Vec2<T>where
T: Send,
impl<T> Sync for Vec2<T>where
T: Sync,
impl<T> Unpin for Vec2<T>where
T: Unpin,
impl<T> UnwindSafe for Vec2<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more