#[repr(C)]pub struct Point2D<S = f32, U = ()> {
pub x: S,
pub y: S,
/* private fields */
}
Expand description
2D point.
Fields§
§x: S
§y: S
Implementations§
Trait Implementations§
source§impl<S, T, U> Add<T> for Point2D<S, U>where
S: Add<Output = S> + Copy,
T: Into<Vector2D<S, U>>,
impl<S, T, U> Add<T> for Point2D<S, U>where S: Add<Output = S> + Copy, T: Into<Vector2D<S, U>>,
source§impl Mul<Point2D<f32, ()>> for Transform3D<f32>
impl Mul<Point2D<f32, ()>> for Transform3D<f32>
Transform a Point2D
with a Transform3D
.
use rgx::math::*;
let m = Transform3D::from_translation(Vector3D::new(8., 8., 0.));
let p = Point2D::new(1., 1.);
assert_eq!(m * p, Point2D::new(9., 9.));
source§impl<S: PartialEq, U: PartialEq> PartialEq<Point2D<S, U>> for Point2D<S, U>
impl<S: PartialEq, U: PartialEq> PartialEq<Point2D<S, U>> for Point2D<S, U>
impl<S: Copy, U: Copy> Copy for Point2D<S, U>
impl<S: Eq, U: Eq> Eq for Point2D<S, U>
impl<S, U> StructuralEq for Point2D<S, U>
impl<S, U> StructuralPartialEq for Point2D<S, U>
Auto Trait Implementations§
impl<S, U> RefUnwindSafe for Point2D<S, U>where S: RefUnwindSafe, U: RefUnwindSafe,
impl<S, U> Send for Point2D<S, U>where S: Send, U: Send,
impl<S, U> Sync for Point2D<S, U>where S: Sync, U: Sync,
impl<S, U> Unpin for Point2D<S, U>where S: Unpin, U: Unpin,
impl<S, U> UnwindSafe for Point2D<S, U>where S: UnwindSafe, U: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more