[−][src]Trait embedded_graphics::coord::ToUnsigned
Convert a value to an unsigned coordinate
Required methods
fn to_unsigned(self) -> UnsignedCoord
Convert the signed coordinate to an unsigned coordinate
Implementors
impl ToUnsigned for Coord
[src]
fn to_unsigned(self) -> UnsignedCoord
[src]
Convert to a positive-only coordinate, clamping negative values to zero
let coord = Coord::new(-5, 10); assert_eq!(coord.to_unsigned(), UnsignedCoord::new(0, 10));