code: static float coslook(float a) {
          double d = a * (.31830989 * (float) COS_LOOKUP_SZ);
          int i = (int) d;
          return COS_LOOKUP[i] + ((float) (d - i)) * (COS_LOOKUP[i + 1] - COS_LOOKUP[i]);
      }
docs: /* interpolated lookup based cos function, domain 0 to PI only