Commit 98a137df authored by Adam P. Goucher's avatar Adam P. Goucher

Remaining case for bounding octagon

parent e02e4d0d
Pipeline #38576942 passed with stage
in 3 minutes
......@@ -175,6 +175,40 @@ namespace apg {
return dz;
}
uint64_t uint64_br(uint64_t tile) {
uint64_t dz = 0;
if (tile & 0x8000000000000000ull) {
dz = 14;
} else if (tile & 0x4080000000000000ull) {
dz = 13;
} else if (tile & 0x2040800000000000ull) {
dz = 12;
} else if (tile & 0x1020408000000000ull) {
dz = 11;
} else if (tile & 0x0810204080000000ull) {
dz = 10;
} else if (tile & 0x0408102040800000ull) {
dz = 9;
} else if (tile & 0x0204081020408000ull) {
dz = 8;
} else if (tile & 0x0102040810204080ull) {
dz = 7;
} else if (tile & 0x0001020408102040ull) {
dz = 6;
} else if (tile & 0x0000010204081020ull) {
dz = 5;
} else if (tile & 0x0000000102040810ull) {
dz = 4;
} else if (tile & 0x0000000001020408ull) {
dz = 3;
} else if (tile & 0x0000000000010204ull) {
dz = 2;
} else if (tile & 0x0000000000000102ull) {
dz = 1;
}
return dz;
}
uint64_t uint64_top(uint64_t tile) {
uint64_t dy = 7;
if (tile & 0x00000000000000ffull) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment