private bool LineContainsPoint(Point point, Pair <Point, Point> line) { return(Mathf.Approximately(Point.Distance(line.First, point) + Point.Distance(line.Second, point), Point.Distance(line.First, line.Second))); }
/// <summary> /// Returns true if the line a contains the line b /// </summary> private bool LineContainsLine(Pair <Point, Point> a, Pair <Point, Point> b) { return(LineContainsPoint(b.First, a) && LineContainsPoint(b.Second, a)); }