Struct visioncortex::Point2[][src]

pub struct Point2<T> {
    pub x: T,
    pub y: T,
}

Generic point in 2D space

Fields

x: Ty: T

Implementations

impl<T> Point2<T>[src]

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

impl<T> Point2<T> where
    T: Add<Output = T> + Mul<Output = T>, 
[src]

pub fn dot(self, v: Self) -> T[src]

impl<T> Point2<T> where
    T: Float
[src]

pub fn rotate(&self, origin: Self, angle: T) -> Self[src]

pub fn translate(self, vector: Self) -> Self[src]

pub fn norm(self) -> T[src]

impl Point2<i32>[src]

pub fn to_point_f64(&self) -> PointF64[src]

impl Point2<f64>[src]

pub fn to_point_i32(&self) -> PointI32[src]

pub fn to_point_f32(&self) -> PointF32[src]

Trait Implementations

impl<T> Add<Point2<T>> for Point2<T> where
    T: Add<Output = T>, 
[src]

type Output = Self

The resulting type after applying the + operator.

impl<T> AddAssign<Point2<T>> for Point2<T> where
    T: AddAssign
[src]

impl<T: Clone> Clone for Point2<T>[src]

impl<T: Copy> Copy for Point2<T>[src]

impl<T: Debug> Debug for Point2<T>[src]

impl<T: Default> Default for Point2<T>[src]

impl<T: Eq> Eq for Point2<T>[src]

impl<T> Neg for Point2<T> where
    T: Neg<Output = T>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T: PartialEq> PartialEq<Point2<T>> for Point2<T>[src]

impl<T> StructuralEq for Point2<T>[src]

impl<T> StructuralPartialEq for Point2<T>[src]

impl<T> Sub<Point2<T>> for Point2<T> where
    T: Sub<Output = T>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T> SubAssign<Point2<T>> for Point2<T> where
    T: SubAssign
[src]

impl<T> ToSvgString for Point2<T> where
    T: Display
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Point2<T> where
    T: RefUnwindSafe

impl<T> Send for Point2<T> where
    T: Send

impl<T> Sync for Point2<T> where
    T: Sync

impl<T> Unpin for Point2<T> where
    T: Unpin

impl<T> UnwindSafe for Point2<T> where
    T: UnwindSafe

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, 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.