1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 01:50:36 +00:00

fixed get_side

This commit is contained in:
Zeno Rogue 2023-08-15 10:55:01 +02:00
parent 53324a9eeb
commit 63fc2c9c92

View File

@ -354,7 +354,7 @@ EX int get_side(const hyperpoint& H) {
if(pmodel == mdRotatedHyperboles)
return H[1] > 0 ? -1 : 1;
if(pmodel == mdHyperboloid) {
return det2(pconf.ball() * cspin90(1, 2) * rgpushxto0(H)) > 0 ? 1 : -1;
return det2(pconf.ball() * cspin90(2, 1) * rgpushxto0(H)) > 0 ? 1 : -1;
}
if(pmodel == mdHyperboloidFlat && sphere)
return H[2] >= 0 ? 1 : -1;
@ -370,7 +370,7 @@ EX int get_side(const hyperpoint& H) {
H1[0] /= H1[2]; H1[1] /= H1[2];
H1[2] = -s * sqrt(1 + H1[0]*H1[0] + H1[1] * H1[1]);
dynamicval<geometryinfo1> g(cginf.g, giHyperb2);
return det2(pconf.ball() * cspin90(1, 2) * rgpushxto0(H1)) > 0 ? 1 : -1;
return det2(pconf.ball() * cspin90(2, 1) * rgpushxto0(H1)) > 0 ? 1 : -1;
}
if(pmodel == mdSpiral && pconf.spiral_cone < 360) {
return cone_side(shiftless(H));