code: private int getVertMask(int vertsCount) {
          int vertMask = Integer.highestOneBit(vertsCount);
          if (vertMask != vertsCount) {
              vertMask *= 2;
          }
          vertMask--;
          return vertMask;
      }
docs: See NavmeshBase.cs: ASTAR_RECAST_LARGER_TILES