S2Loop.getCanonicalFirstVertex

Returns an index "first" and a direction "dir" (either +1 or -1) such that the vertex sequence (first, first+dir, ..., first+(n-1)*dir) does not change when the loop vertex order is rotated or inverted. This allows the loop vertices to be traversed in a canonical order. The return values are chosen such that (first, ..., first+n*dir) are in the range [0, 2*n-1] as expected by the vertex() method.

class S2Loop
package const
int
getCanonicalFirstVertex
(
out int dir
)

Meta