[][src]Struct rosu_pp::Pos2

pub struct Pos2 {
    pub x: f32,
    pub y: f32,
}

Simple (x, y) coordinate / vector

Fields

x: f32y: 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.

impl AddAssign<Pos2> for Pos2[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.

impl Mul<f32> for Pos2[src]

type Output = Self

The resulting type after applying the * operator.

impl PartialEq<Pos2> for Pos2[src]

impl StructuralPartialEq for Pos2[src]

impl Sub<Pos2> for Pos2[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.