1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-06 16:52:59 +00:00

added some missing CAP_ and MAXMDIM guards

This commit is contained in:
Zeno Rogue
2019-05-07 01:08:49 +02:00
parent 044298d0bd
commit c8e950cd40
25 changed files with 126 additions and 25 deletions

View File

@@ -213,27 +213,33 @@ transmatrix calc_relative_matrix_help(cell *c, heptagon *h1) {
struct horo_distance {
ld a, b;
horo_distance(hyperpoint h1) {
#if CAP_BT
if(binarytiling) {
b = intval(h1, C0);
a = abs(binary::horo_level(h1));
}
else
#endif
a = 0, b = intval(h1, C0);
}
horo_distance(hyperpoint h1, const transmatrix& T) {
#if CAP_BT
if(binarytiling) {
hyperpoint ih1 = inverse(T) * h1;
b = intval(ih1, C0);
a = abs(binary::horo_level(ih1));
}
else
#endif
a = 0, b = intval(h1, tC0(T));
}
bool operator < (const horo_distance z) {
#if CAP_BT
if(binarytiling) {
if(a < z.a-1e-6) return true;
if(a > z.a+1e-6) return false;
}
#endif
return b < z.b - 1e-4;
}
};