fixed central inversion in 3D models

This commit is contained in:
Zeno Rogue 2020-04-17 02:22:01 +02:00
parent 7f96c67755
commit 466b81f854
1 changed files with 1 additions and 0 deletions

View File

@ -400,6 +400,7 @@ EX void applymodel(hyperpoint H, hyperpoint& ret) {
case mdCentralInversion: {
ld tz = get_tz(H);
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;
for(int d=0; d<GDIM; d++) r += ret[d]*ret[d];
for(int d=0; d<GDIM; d++) ret[d] /= r;