static _clampImageryLevel(imageryProvider, imageryLevel) {
    const minimumLevel = imageryProvider.minimumLevel ?? 0;
    const maximumLevel =
      imageryProvider.maximumLevel ?? Number.POSITIVE_INFINITY;
    const clampedImageryLevel = Math.min(
      maximumLevel - 1,
      Math.max(minimumLevel, imageryLevel),
    );
    const validImageryLevel = Math.floor(clampedImageryLevel);
    return validImageryLevel;
  }
Validate the given imagery level against the constraints of the
given imagery provider.

This will clamp the given level to be in the range
<code>[minimumLevel, maximumLevel)</code> that is
defined by the given imagery provider (and cut off
any fractional part that the input may have)

@param {ImageryProvider} imageryProvider The imagery provider
@param {number} imageryLevel The imagery level
@returns {number} The validated level