mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-31 04:54:29 +00:00
new pmodel: Central Inversion (for Euclidean)
This commit is contained in:
1 parent
15a9b6135b
commit
fc43a4716b
5 files changed
+15
-2
No files matched your search
@@ -309,6 +309,15 @@ void applymodel(hyperpoint H, hyperpoint& ret) {
|
||||
return;
|
||||
}
|
||||
|
||||
case mdCentralInversion: {
|
||||
ld tz = get_tz(H);
|
||||
for(int d=0; d<DIM; d++) ret[d] = H[d] / tz;
|
||||
ld r = 0;
|
||||
for(int d=0; d<DIM; d++) r += ret[d]*ret[d];
|
||||
for(int d=0; d<DIM; d++) ret[d] /= r;
|
||||
return;
|
||||
}
|
||||
|
||||
case mdHalfplane: {
|
||||
// Poincare to half-plane
|
||||
|
||||
|
||||
Reference in new issue
Block a user