code: public Matrix3d rotateZ(double ang, Matrix3d dest) {
          double sin, cos;
          sin = Math.sin(ang);
          cos = Math.cosFromSin(sin, ang);
          double rm00 = cos;
          double rm10 = -sin;
          double rm01 = sin;
          double rm11 = cos;
  
          // add temporaries for dependent values
          double nm00 = m00 * rm00 + m10 * rm01;
          double nm01 = m01 * rm00 + m11 * rm01;
          double nm02 = m02 * rm00 + m12 * rm01;
          // set non-dependent values directly
          dest.m10 = m00 * rm10 + m10 * rm11;
          dest.m11 = m01 * rm10 + m11 * rm11;
          dest.m12 = m02 * rm10 + m12 * rm11;
          // set other values
          dest.m00 = nm00;
          dest.m01 = nm01;
          dest.m02 = nm02;
          dest.m20 = m20;
          dest.m21 = m21;
          dest.m22 = m22;
  
          return dest;
      }
docs: /* (non-Javadoc)
  @see org.joml.Matrix3dc#rotateZ(double, org.joml.Matrix3d)