isBetween static method

bool isBetween({
  1. required double angle,
  2. required double a,
  3. required double b,
})

Determines if an angle is between two other angles, rotating clockwise.

Implementation

static bool isBetween(
    {required double angle, required double a, required double b}) {
  if (a < b) {
    return a <= angle && angle <= b;
  }
  return a <= angle || angle <= b;
}