pub fn distance_to(&self, other: &Object) -> f32 {
        let x_amount = other.x - self.x;
        let y_amount = other.y - self.y;
        ((x_amount.pow(2) + y_amount.pow(2)) as f32).sqrt()
    }
/// return the distance to another object
return the distance to another object
return the distance to another object
pub fn distance_to(&self, other: &Object) -> f32 {
        let x_amount = other.x - self.x;
        let y_amount = other.y - self.y;
        ((x_amount.pow(2) + y_amount.pow(2)) as f32).sqrt()
    }
pub fn distance_to ( & self , other : & Object ) -> f32 { let x_amount = other . x - self . x ; let y_amount = other . y - self . y ; ( ( x_amount . pow ( 2 ) + y_amount . pow ( 2 ) ) as f32 ) . sqrt ( ) }
return the distance to another object
return the distance to another object
&self
other
&Object