onSegment function
dynamic
onSegment(
- dynamic p,
- dynamic q,
- dynamic r
Implementation
onSegment(p, q, r) {
return q.x <= Math.max<num>(p.x, r.x) &&
q.x >= Math.min<num>(p.x, r.x) &&
q.y <= Math.max<num>(p.y, r.y) &&
q.y >= Math.min<num>(p.y, r.y);
}