[−][src]Struct rg3d_core::math::vec2::Vec2
Fields
x: f32
y: f32
Implementations
impl Vec2
[src]
pub const ZERO: Self
[src]
pub const UNIT: Self
[src]
pub const X: Self
[src]
pub const Y: Self
[src]
pub const fn xx(self) -> Self
[src]
pub const fn yy(self) -> Self
[src]
pub const fn new(x: f32, y: f32) -> Self
[src]
pub fn dot(self, other: Self) -> f32
[src]
pub fn len(self) -> f32
[src]
pub fn angle(self, other: Self) -> f32
[src]
pub fn perpendicular(self) -> Self
[src]
pub fn scale(self, scalar: f32) -> Self
[src]
pub fn min(&self, other: Self) -> Self
[src]
Per component min
pub fn max(&self, other: Self) -> Self
[src]
Per component max
pub fn normalized(self) -> Option<Self>
[src]
pub fn reciprocal(&self) -> Vec2
[src]
Trait Implementations
impl Add<Vec2> for Vec2
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, b: Self) -> Self
[src]
impl AddAssign<Vec2> for Vec2
[src]
fn add_assign(&mut self, b: Self)
[src]
impl Clone for Vec2
[src]
impl Copy for Vec2
[src]
impl Debug for Vec2
[src]
impl Default for Vec2
[src]
impl Eq for Vec2
[src]
impl FieldData for Vec2
[src]
impl From<(f32, f32)> for Vec2
[src]
impl From<Vec2> for (f32, f32)
[src]
impl Hash for Vec2
[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 Neg for Vec2
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl PartialEq<Vec2> for Vec2
[src]
impl Sub<Vec2> for Vec2
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, b: Self) -> Self
[src]
impl SubAssign<Vec2> for Vec2
[src]
fn sub_assign(&mut self, b: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec2
impl Send for Vec2
impl Sync for Vec2
impl Unpin for Vec2
impl UnwindSafe for Vec2
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> Visit for T where
T: FieldData + 'static,
[src]
T: FieldData + 'static,