onSegment method

bool onSegment(
  1. PointD point
)

Implementation

bool onSegment(PointD point) =>
    point.x <= max(source.x, target.x) &&
    point.x >= min(source.x, target.x) &&
    point.y <= max(source.y, target.y) &&
    point.y >= min(source.y, target.y);