pub fn distance_to(self, point: &Point) -> f32 {
        let a = (self.x as f32 - point.x as f32).powf(2.0);
        let b = (self.y as f32 - point.y as f32).powf(2.0);
        (a + b).sqrt()
    }
/// Euclidean distance to a given point
Euclidean distance to a given point
Euclidean distance to a given point
pub fn distance_to(self, point: &Point) -> f32 {
        let a = (self.x as f32 - point.x as f32).powf(2.0);
        let b = (self.y as f32 - point.y as f32).powf(2.0);
        (a + b).sqrt()
    }
pub fn distance_to ( self , point : & Point ) -> f32 { let a = ( self . x as f32 - point . x as f32 ) . powf ( 2.0 ) ; let b = ( self . y as f32 - point . y as f32 ) . powf ( 2.0 ) ; ( a + b ) . sqrt ( ) }
Euclidean distance to a given point
Euclidean distance to a given point
self
point
&Point
self
point
&Point