src/de/openhpi/squash/model/Point.java
// the function checks if point q lies on line segment 'pr'
the function checks if point q lies on line segment 'pr'
the function checks if point q lies on line segment ' pr '
private static boolean onSegment(Point p, Point q, Point r) {
        if (q.x <= Math.max(p.x, r.x) && 
            q.x >= Math.min(p.x, r.x) &&
            q.y <= Math.max(p.y, r.y) && 
            q.y >= Math.min(p.y, r.y))
            return true;
        return false;
    }
private static boolean onSegment ( Point p , Point q , Point r ) { if ( q . x <= Math . max ( p . x , r . x ) && q . x >= Math . min ( p . x , r . x ) && q . y <= Math . max ( p . y , r . y ) && q . y >= Math . min ( p . y , r . y ) ) return true ; return false ; }
the function checks if point q lies on line segment 'pr'
the function checks if point q lies on line segment ' pr '