s2js
    Preparing search index...

    Function maxTile

    • Returns the largest cell with the same RangeMin such that RangeMax < limit.RangeMin. It returns limit if no such cell exists. This method can be used to generate a small set of CellIDs that covers a given range (a tiling). This example shows how to generate a tiling for a semi-open range of leaf cells [start, limit):

      for id = start.maxTile(limit); id !== limit; id = id.next().maxTile(limit)) { ... }

      Note that in general the cells in the tiling will be of different sizes; they gradually get larger (near the middle of the range) and then gradually get smaller as limit is approached.

      Parameters

      • ci: bigint
      • limit: bigint

      Returns bigint