Function advent_of_code_2021::day_19::rotations[−][src]

fn rotations(
    scanner: &Vec<(isize, isize, isize)>
) -> Vec<Vec<(isize, isize, isize)>>ⓘ
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator, 
Expand description

Expand a scanner into each of the 24 possible rotations. I started off trying to build the set of rotation functions as a static vector of closures that could be cached using lazy_static! but I was wasting too much time trying to satisfy the compiler so ended up with this mess as I inlined the 6 valid combinations for each ±x, ±y permutation.