Function S2Cell.subdivide

Divides the S2Cell into its four children.

bool subdivide (
  out S2Cell[4] children
) const;

If this is not a leaf cell, sets children[0..3] to the four children of this cell (in traversal order) and return true. Otherwise returns false. This method is equivalent to the following:

for (pos=0, id=child_begin(); id != child_end(); id = id.next(), ++pos) children[pos] = S2Cell(id);

except that it is more than two times faster.