xor method

List<Rect> xor(
  1. Rect other, {
  2. double epsilon = 0.0,
})

Implementation

List<Rect> xor(Rect other, {double epsilon = 0.0}) {
  if (!overlaps(other)) return [this, other];
  final a = minus(other, epsilon: epsilon);
  final b = other.minus(this, epsilon: epsilon);
  return [...a, ...b];
}