1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

fixed centerpc to use zero_d(H, DIM) instead of zero_d(H, 2)

This commit is contained in:
? 2019-02-26 14:38:16 +01:00 committed by Zeno Rogue
parent 3de228fce1
commit 5c2cb1de76

View File

@ -1059,7 +1059,7 @@ void centerpc(ld aspd) {
ors::unrotate(cwtV); ors::unrotate(View);
hyperpoint H = ypush(-vid.yshift) * sphereflip * tC0(cwtV);
ld R = zero_d(H, 2) ? 0 : hdist0(H); // = sqrt(H[0] * H[0] + H[1] * H[1]);
ld R = zero_d(H, DIM) ? 0 : hdist0(H);
if(R < 1e-9) {
// either already centered or direction unknown
/* if(playerfoundL && playerfoundR) {