question: public PlaPointInt orthogonal_projection ( PlaPointInt p_other ) { PlaPointInt result ; int horizontal_distance = Math . abs ( this . v_x - p_other . v_x ) ; int vertical_distance = Math . abs ( this . v_y - p_other . v_y ) ; if ( horizontal_distance <= vertical_distance ) { result = new PlaPointInt ( p_other . v_x , this . v_y ) ; } else { result = new PlaPointInt ( this . v_x , p_other . v_y ) ; } return result ; }
target:  Calculates the nearest point to this point on the horizontal or vertical line through p_other (Snaps this point to on ortogonal line through p_other).