pub trait PointBase<C: CoordinateBase> {
    // Required methods
    fn new(x: C::Coord, y: C::Coord) -> Self;
    fn get(&self, orient: Orientation2D) -> C::Coord;
    fn set(&mut self, orient: Orientation2D, value: C::Coord);

    // Provided methods
    fn x(&self) -> C::Coord { ... }
    fn y(&self) -> C::Coord { ... }
}
Expand description

Basic traits to get and set Kartesian coordinates of a point in the two-dimensional plane.

Required Methods§

source

fn new(x: C::Coord, y: C::Coord) -> Self

Construct a new point.

source

fn get(&self, orient: Orientation2D) -> C::Coord

Get a coordinate value.

source

fn set(&mut self, orient: Orientation2D, value: C::Coord)

Set a coordinate value.

Provided Methods§

source

fn x(&self) -> C::Coord

Get the x-coordinate value.

source

fn y(&self) -> C::Coord

Get the y-coordinate value.

Implementors§

source§

impl<C> PointBase<C> for Point<C::Coord>where C: CoordinateBase,