[][src]Struct svgbob::Point

pub struct Point(_);

Methods

impl Point[src]

pub fn new(x: f32, y: f32) -> Self[src]

pub fn to_vector(&self) -> Vector2<f32>[src]

convert a point to vector

pub fn scale(&self, scale: f32) -> Self[src]

scale point

pub fn normalize(&self) -> Point[src]

pub fn distance(&self, other: &Self) -> f32[src]

pub fn align(&self) -> Self[src]

align x to 0.5 align y to odd number

Trait Implementations

impl Add<Point> for Point[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Point[src]

impl Copy for Point[src]

impl Debug for Point[src]

impl Deref for Point[src]

type Target = Point2<f32>

The resulting type after dereferencing.

impl Display for Point[src]

impl Eq for Point[src]

impl From<Point<f32, U2>> for Point[src]

impl From<Point<i32, U2>> for Point[src]

impl Ord for Point[src]

impl PartialEq<Point> for Point[src]

impl PartialOrd<Point> for Point[src]

impl Sub<Point> for Point[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Point

impl Send for Point

impl Sync for Point

impl Unpin for Point

impl UnwindSafe for Point

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.