pointsAt method

bool pointsAt(
  1. Line line
)

Implementation

bool pointsAt(Line line) {
  final result = toLine().intersections(line);
  if (result.isNotEmpty) {
    final delta = to - from;
    final intersection = result.first;
    final intersectionDelta = intersection - to;
    // Whether the two points [from] and [through] forms a ray that points on
    // the line represented by this object
    if (delta.x.sign == intersectionDelta.x.sign &&
        delta.y.sign == intersectionDelta.y.sign) {
      return true;
    }
  }
  return false;
}