isInSegmentEnvelopes method

bool isInSegmentEnvelopes(
  1. Coordinate intPt
)

Tests whether a point lies in the envelopes of both input segments. A correctly computed intersection point should return true for this test. Since this test is for debugging purposes only, no attempt is made to optimize the envelope test.

@return true if the input point lies within both input segment envelopes

Implementation

bool isInSegmentEnvelopes(Coordinate intPt) {
  Envelope env0 =
      new Envelope.fromCoordinates(inputLines[0][0]!, inputLines[0][1]!);
  Envelope env1 =
      new Envelope.fromCoordinates(inputLines[1][0]!, inputLines[1][1]!);
  return env0.containsCoordinate(intPt) && env1.containsCoordinate(intPt);
}