[−][src]Type Definition embedded_graphics::coord::Coord
type Coord = Vector2<i32>;
2D coordinate type with Nalgebra support
Trait Implementations
impl ToUnsigned for Coord
[src]
fn to_unsigned(self) -> UnsignedCoord
[src]
Convert to a positive-only coordinate, clamping negative values to zero
use embedded_graphics::coord::Coord;
use embedded_graphics::unsignedcoord::UnsignedCoord;
let coord = Coord::new(-5, 10);
assert_eq!(coord.to_unsigned(), UnsignedCoord::new(0, 10));