wrap360 method

dynamic wrap360(
  1. dynamic degrees
)

Implementation

wrap360(var degrees) {
  if (0 <= degrees && degrees < 360)
    return degrees;
  return (degrees % 360 + 360) % 360;
}