3 static const unsigned dx[V6]= { 0, +1, -1, +1, -1, 0 },
4 dy[V6]= { +Y1, +Y1, 0, 0, -Y1, -Y1 };
7 int edge_end2(unsigned v1, int e) {
8 /* The topology is equivalent to that of a square lattice with only
9 * half of the diagonals. Ie, the result of shearing the triangular
10 * lattice to make the lines of constant x vertical. This gives
11 * these six directions:
21 * This also handily makes vertical the numbering discontinuity,
22 * where the join happens.
26 y= (v1 & YMASK) + dy[e];
27 if (y & ~YMASK) return -1;
29 x= (v1 & XMASK) + dx[e];