[−][src]Struct rgx::math::algebra::Point2
Fields
x: S
y: 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]
F: FnMut(S) -> T,
Trait Implementations
impl<S> Add<Vector2<S>> for Point2<S> where
S: Add<Output = S> + Copy,
[src]
S: Add<Output = S> + Copy,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Vector2<S>) -> Self
[src]
impl<S: Clone> Clone for Point2<S>
[src]
impl<S: Copy> Copy 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]
S: Div<Output = S> + Copy,
impl<S: Eq> Eq for Point2<S>
[src]
impl<T: Copy> From<[T; 2]> for Point2<T>
[src]
impl<S> From<Point2<S>> for Vector2<S>
[src]
impl<S> From<Vector2<S>> for Point2<S>
[src]
impl<S: Hash> Hash for Point2<S>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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.
fn mul(self, p: Point2<f32>) -> Point2<f32>
[src]
impl<S> Mul<S> for Point2<S> where
S: Mul<Output = S> + Copy,
[src]
S: Mul<Output = S> + Copy,
impl<S: PartialEq> PartialEq<Point2<S>> for Point2<S>
[src]
impl<S> StructuralEq for Point2<S>
[src]
impl<S> StructuralPartialEq for Point2<S>
[src]
impl<S> Sub<Point2<S>> for Point2<S> where
S: Sub<Output = S> + Copy,
[src]
S: Sub<Output = S> + Copy,
type Output = Vector2<S>
The resulting type after applying the -
operator.
fn sub(self, other: Point2<S>) -> Vector2<S>
[src]
impl<S> Sub<Vector2<S>> for Point2<S> where
S: Sub<Output = S> + Copy,
[src]
S: Sub<Output = S> + Copy,
Auto Trait Implementations
impl<S> RefUnwindSafe for Point2<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for Point2<S> where
S: Send,
S: Send,
impl<S> Sync for Point2<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Point2<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Point2<S> where
S: UnwindSafe,
S: UnwindSafe,
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,
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,