add helper routines for qr finding

This commit is contained in:
bunnie 2024-11-05 01:45:29 +08:00
parent dc20c84785
commit b1e31924a0

View file

@ -63,6 +63,12 @@ pub struct Point {
}
impl Point {
pub fn new(x: isize, y: isize) -> Self { Point { x, y } }
pub fn to_f32(&self) -> (f32, f32) { (self.x as f32, self.y as f32) }
}
impl Default for Point {
fn default() -> Self { Point::new(0, 0) }
}
impl Add for Point {