contains360 method

bool contains360(
  1. Angle angle, [
  2. bool inclusive = true,
  3. double epsilon = 1.0e-10
])

True if this range, projected onto the 0-360 degree circle contains angle when it also is projected onto the 0-360 circle.

The test is inclusive of the endpoints by default and has a rounding tolerance, epsilon of 1.0e-10.

This is a more lenient test than contains() in superclass QuantityRange.

Implementation

bool contains360(Angle angle,
    [bool inclusive = true, double epsilon = 1.0e-10]) {
  if (contains(angle, inclusive, epsilon) || revolutions.abs() > 0) {
    return true;
  }
  final ang360 = angle.angle360;
  for (final range in ranges360) {
    if (range.contains(ang360, inclusive, epsilon)) return true;
  }
  return false;
}