intersectLineLine static method

Point intersectLineLine(
  1. Line a,
  2. Line b
)

Implementation

static Point intersectLineLine(Line a, Line b) {
  var x = (a.intercept - b.intercept) / (b.slope - a.slope);
  var y = a.slope * x + a.intercept;
  return Point(x, y);
}