docs: protected void setSpeed(boolean reverse, IntsRef edgeFlags, double speed) {
          if (speed < 0 || Double.isNaN(speed))
              throw new IllegalArgumentException("Speed cannot be negative or NaN: " + speed + ", flags:" + BitUtil.LITTLE.toBitString(edgeFlags));
  
          if (speed < speedFactor / 2) {
              speedEncoder.setDecimal(reverse, edgeFlags, 0);
              accessEnc.setBool(reverse, edgeFlags, false);
              return;
          }
  
          if (speed > getMaxSpeed())
              speed = getMaxSpeed();
  
          speedEncoder.setDecimal(reverse, edgeFlags, speed);
      }