fn diagonal(&self, p: Point) -> bool {
        let x1 = self.x as f64;
        let x2 = p.x as f64;
        let y1 = self.y as f64;
        let y2 = p.y as f64;
        (((x1 + x2).abs() / 2_f64) == ((y1 + y2).abs() / 2_f64)) || (((x1 - x2).abs() / 2_f64) == ((y1 - y2).abs() / 2_f64))
    }
// Check if two points are diagonal
Check if two points are diagonal
Check if two points are diagonal
fn diagonal(&self, p: Point) -> bool {
        let x1 = self.x as f64;
        let x2 = p.x as f64;
        let y1 = self.y as f64;
        let y2 = p.y as f64;
        (((x1 + x2).abs() / 2_f64) == ((y1 + y2).abs() / 2_f64)) || (((x1 - x2).abs() / 2_f64) == ((y1 - y2).abs() / 2_f64))
    }
fn diagonal ( & self , p : Point ) -> bool { let x1 = self . x as f64 ; let x2 = p . x as f64 ; let y1 = self . y as f64 ; let y2 = p . y as f64 ; ( ( ( x1 + x2 ) . abs ( ) / 2_f64 ) == ( ( y1 + y2 ) . abs ( ) / 2_f64 ) ) || ( ( ( x1 - x2 ) . abs ( ) / 2_f64 ) == ( ( y1 - y2 ) . abs ( ) / 2_f64 ) ) }
Check if two points are diagonal
Check if two points are diagonal
&self
p
Point
&self
p
Point