[][src]Struct rgx::math::algebra::Point2

#[repr(C)]
pub struct Point2<S> {
    pub x: S,
    pub y: S,
}

Fields

x: Sy: S

Methods

impl<S> Point2<S>[src]

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

pub fn map<F, T>(self, f: F) -> Point2<T> where
    F: FnMut(S) -> T, 
[src]

Trait Implementations

impl<S> From<Point2<S>> for Vector2<S>[src]

impl<S> From<Vector2<S>> for Point2<S>[src]

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

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

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

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

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

impl<S> Div<S> for Point2<S> where
    S: Div<Output = S> + Copy
[src]

type Output = Self

The resulting type after applying the / operator.

impl<S> Sub<Vector2<S>> for Point2<S> where
    S: Sub<Output = S> + Copy
[src]

type Output = Self

The resulting type after applying the - operator.

impl<S> Sub<Point2<S>> for Point2<S> where
    S: Sub<Output = S> + Copy
[src]

type Output = Vector2<S>

The resulting type after applying the - operator.

impl<S> Add<Vector2<S>> for Point2<S> where
    S: Add<Output = S> + Copy
[src]

type Output = Self

The resulting type after applying the + operator.

impl<S> Mul<S> for Point2<S> where
    S: Mul<Output = S> + Copy
[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Point2<f32>> for Matrix4<f32>[src]

Transform a Point2 with a Matrix4.

use rgx::math::*;
let m = Matrix4::from_translation(Vector3::new(8., 8., 0.));
let p = Point2::new(1., 1.);

assert_eq!(m * p, Point2::new(9., 9.));

type Output = Point2<f32>

The resulting type after applying the * operator.

impl<S: Hash> Hash for Point2<S>[src]

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

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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 = !

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.

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

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

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