pub struct Offset {
pub dx: f32,
pub dy: f32,
}Expand description
A 2D displacement vector.
Semantically different from Point: a point is a position,
an offset is a delta between two positions. Point - Point = Offset,
Point + Offset = Point.
Fields§
§dx: f32§dy: f32Implementations§
Trait Implementations§
impl Copy for Offset
impl StructuralPartialEq for Offset
Auto Trait Implementations§
impl Freeze for Offset
impl RefUnwindSafe for Offset
impl Send for Offset
impl Sync for Offset
impl Unpin for Offset
impl UnsafeUnpin for Offset
impl UnwindSafe for Offset
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