docs: @Override
      public final long encode(double lat, double lon) {
          // PERFORMANCE: int operations would be faster than double (for further comparison etc)
          // but we would need 'long' because 'int factorForPrecision' is not enough (problem: coord!=decode(encode(coord)) see testBijection)
          // and 'long'-ops are more expensive than double (at least on 32bit systems)
          long hash = 0;
          double minLatTmp = bbox.minLat;
          double maxLatTmp = bbox.maxLat;
          double minLonTmp = bbox.minLon;
          double maxLonTmp = bbox.maxLon;
          int i = 0;
          while (true) {
              if (minLatTmp < maxLatTmp) {
                  double midLat = (minLatTmp + maxLatTmp) / 2;
                  if (lat < midLat) {
                      maxLatTmp = midLat;
                  } else {
                      hash |= 1;
                      minLatTmp = midLat;
                  }
              }
              i++;
  
              if (i < allBits)
                  hash <<= 1;
              else
                  // if allBits is an odd number
                  break;
  
              if (minLonTmp < maxLonTmp) {
                  double midLon = (minLonTmp + maxLonTmp) / 2;
                  if (lon < midLon) {
                      maxLonTmp = midLon;
                  } else {
                      hash |= 1;
                      minLonTmp = midLon;
                  }
              }
              i++;
              if (i < allBits)
                  hash <<= 1;
              else
                  break;
          }
          return hash;
      }