pub struct Vector(pub f32, pub f32);
Expand description
Describe a point in 2-space
Use two floats to denote the x and y coordinates respectively in the tuple.
use tile_net::Vector;
let point = Vector(0.5, 1.0);
assert_eq!(point.0, 0.5);
assert_eq!(point.1, 1.0);
Tuple Fields§
§0: f32
§1: f32
Implementations§
Trait Implementations§
source§impl AddAssign<Vector> for Vector
impl AddAssign<Vector> for Vector
source§fn add_assign(&mut self, rhs: Vector)
fn add_assign(&mut self, rhs: Vector)
Performs the
+=
operation. Read moresource§impl PartialEq<Vector> for Vector
impl PartialEq<Vector> for Vector
impl Copy for Vector
impl StructuralPartialEq for Vector
Auto Trait Implementations§
impl RefUnwindSafe for Vector
impl Send for Vector
impl Sync for Vector
impl Unpin for Vector
impl UnwindSafe for Vector
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