Skip to main content

DIRECTIONS

Constant DIRECTIONS 

Source
const DIRECTIONS: [(i32, i32, i32); 13];
Expand description

The 13 direction vectors of the 26-neighbourhood, one per antipodal pair.

Which representative of a pair is used does not matter: the second difference wrap(p[i-d] - p[i]) - wrap(p[i] - p[i+d]) is invariant under d -> -d, because wrap is odd.