pub struct Point2<S> {
pub x: S,
pub y: S,
}
Expand description
A two dimensional point.
This is the basic type used for defining positions.
Fields§
§x: S
The point’s x coordinate
y: S
The point’s y coordinate
Implementations§
Trait Implementations§
source§impl<S: SpadeNum> HasPosition for Point2<S>
impl<S: SpadeNum> HasPosition for Point2<S>
source§impl<S: PartialEq> PartialEq for Point2<S>
impl<S: PartialEq> PartialEq for Point2<S>
source§impl<S: PartialOrd> PartialOrd for Point2<S>
impl<S: PartialOrd> PartialOrd for Point2<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<S: Copy> Copy for Point2<S>
impl<S: Eq> Eq for Point2<S>
impl<S> StructuralPartialEq for Point2<S>
Auto Trait Implementations§
impl<S> Freeze for Point2<S>where
S: Freeze,
impl<S> RefUnwindSafe for Point2<S>where
S: RefUnwindSafe,
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,
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