code: public Matrix4d rotateTowardsXY(double dirX, double dirY, Matrix4d dest) {
          if ((properties & PROPERTY_IDENTITY) != 0)
              return dest.rotationTowardsXY(dirX, dirY);
          double rm00 = dirY;
          double rm01 = dirX;
          double rm10 = -dirX;
          double rm11 = dirY;
          double nm00 = m00 * rm00 + m10 * rm01;
          double nm01 = m01 * rm00 + m11 * rm01;
          double nm02 = m02 * rm00 + m12 * rm01;
          double nm03 = m03 * rm00 + m13 * rm01;
          dest.m10 = m00 * rm10 + m10 * rm11;
          dest.m11 = m01 * rm10 + m11 * rm11;
          dest.m12 = m02 * rm10 + m12 * rm11;
          dest.m13 = m03 * rm10 + m13 * rm11;
          dest.m00 = nm00;
          dest.m01 = nm01;
          dest.m02 = nm02;
          dest.m03 = nm03;
          dest.m20 = m20;
          dest.m21 = m21;
          dest.m22 = m22;
          dest.m23 = m23;
          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#rotateTowardsXY(double, double, org.joml.Matrix4d)