util.js 151 B

12345678
  1. var PI2 = Math.PI * 2;
  2. export function normalizeRadian(angle) {
  3. angle %= PI2;
  4. if (angle < 0) {
  5. angle += PI2;
  6. }
  7. return angle;
  8. }