restrictToMax method

ZoomlevelRange restrictToMax(
  1. int max
)

Creates a new ZoomlevelRange by restricting the maximum zoom level of this range to the given max value, if it is smaller.

Implementation

ZoomlevelRange restrictToMax(int max) {
  return ZoomlevelRange(zoomlevelMin, Math.min(max, zoomlevelMax));
}