[−][src]Struct rosu_pp::Pos2
Simple (x, y) coordinate / vector
Fields
x: f32
y: f32
Implementations
impl Pos2
[src]
pub fn length_squared(&self) -> f32
[src]
pub fn length(&self) -> f32
[src]
pub fn dot(&self, other: Self) -> f32
[src]
pub fn distance(&self, other: &Self) -> f32
[src]
pub fn add_scaled(self, other: Pos2, factor: f32) -> Pos2
[src]
pub fn normalize(self) -> Pos2
[src]
Trait Implementations
impl Add<Pos2> for Pos2
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl AddAssign<Pos2> for Pos2
[src]
fn add_assign(&mut self, other: Self)
[src]
impl Clone for Pos2
[src]
impl Copy for Pos2
[src]
impl Debug for Pos2
[src]
impl Default for Pos2
[src]
impl Display for Pos2
[src]
impl Div<f32> for Pos2
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: f32) -> Self::Output
[src]
impl Mul<f32> for Pos2
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Self::Output
[src]
impl PartialEq<Pos2> for Pos2
[src]
impl StructuralPartialEq for Pos2
[src]
impl Sub<Pos2> for Pos2
[src]
Auto Trait Implementations
impl RefUnwindSafe for Pos2
[src]
impl Send for Pos2
[src]
impl Sync for Pos2
[src]
impl Unpin for Pos2
[src]
impl UnwindSafe for Pos2
[src]
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,