code: public Quaternion fromAngles (float x, float y, float z) {
          // TODO: it may be more convenient to define the angles in the opposite order (first z,
          // then y, then x)
          float hx = x * 0.5f, hy = y * 0.5f, hz = z * 0.5f;
          float sz = FloatMath.sin(hz), cz = FloatMath.cos(hz);
          float sy = FloatMath.sin(hy), cy = FloatMath.cos(hy);
          float sx = FloatMath.sin(hx), cx = FloatMath.cos(hx);
          float szsy = sz*sy, czsy = cz*sy, szcy = sz*cy, czcy = cz*cy;
          return set(
              czcy*sx - szsy*cx,
              czsy*cx + szcy*sx,
              szcy*cx - czsy*sx,
              czcy*cx + szsy*sx);
      }
docs: Sets this quaternion to one that first rotates about x by the specified number of radians,
  then rotates about y, then about z.