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