mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-24 07:56:59 +00:00
fixed central inversion in 3D models
This commit is contained in:
parent
7f96c67755
commit
466b81f854
@ -400,6 +400,7 @@ EX void applymodel(hyperpoint H, hyperpoint& ret) {
|
|||||||
case mdCentralInversion: {
|
case mdCentralInversion: {
|
||||||
ld tz = get_tz(H);
|
ld tz = get_tz(H);
|
||||||
for(int d=0; d<GDIM; d++) ret[d] = H[d] / tz;
|
for(int d=0; d<GDIM; d++) ret[d] = H[d] / tz;
|
||||||
|
for(int d=GDIM; d<MAXMDIM; d++) ret[d] = 1;
|
||||||
ld r = 0;
|
ld r = 0;
|
||||||
for(int d=0; d<GDIM; d++) r += ret[d]*ret[d];
|
for(int d=0; d<GDIM; d++) r += ret[d]*ret[d];
|
||||||
for(int d=0; d<GDIM; d++) ret[d] /= r;
|
for(int d=0; d<GDIM; d++) ret[d] /= r;
|
||||||
|
Loading…
Reference in New Issue
Block a user