use crate::Point;
use std::fmt;
impl fmt::Display for Point {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "({}, {})", self.x, self.y)
}
}
impl Point {
pub const fn new(x: i32, y: i32) -> Self {
Self { x, y }
}
pub const fn to_tuple(&self) -> (i32, i32) {
(self.x, self.y)
}
}