code: public static float normalizeAngle (float a) {
          while (a < -FloatMath.PI) {
              a += TWO_PI;
          }
          while (a >= FloatMath.PI) {
              a -= TWO_PI;
          }
          return a;
      }
docs: Returns an angle in the range [-pi, pi).