boolean onseg(Point a, Point b) { return this.side(a, b) == 0 && this.dist2(a) <= a.dist2(b) && this.dist2(b) <= a.dist2(b); }