code: public Matrix4d rotateX(double ang, Matrix4d dest) {
          if ((properties & PROPERTY_IDENTITY) != 0)
              return dest.rotationX(ang);
          double sin, cos;
          sin = Math.sin(ang);
          cos = Math.cosFromSin(sin, ang);
          double rm11 = cos;
          double rm12 = sin;
          double rm21 = -sin;
          double rm22 = cos;
  
          // add temporaries for dependent values
          double nm10 = m10 * rm11 + m20 * rm12;
          double nm11 = m11 * rm11 + m21 * rm12;
          double nm12 = m12 * rm11 + m22 * rm12;
          double nm13 = m13 * rm11 + m23 * rm12;
          // set non-dependent values directly
          dest.m20 = m10 * rm21 + m20 * rm22;
          dest.m21 = m11 * rm21 + m21 * rm22;
          dest.m22 = m12 * rm21 + m22 * rm22;
          dest.m23 = m13 * rm21 + m23 * rm22;
          // set other values
          dest.m10 = nm10;
          dest.m11 = nm11;
          dest.m12 = nm12;
          dest.m13 = nm13;
          dest.m00 = m00;
          dest.m01 = m01;
          dest.m02 = m02;
          dest.m03 = m03;
          dest.m30 = m30;
          dest.m31 = m31;
          dest.m32 = m32;
          dest.m33 = m33;
          dest.properties = properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION);
          return dest;
      }
docs: /* (non-Javadoc)
  @see org.joml.Matrix4dc#rotateX(double, org.joml.Matrix4d)