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