mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-02-27 18:39:43 +00:00
new pmodel: Central Inversion (for Euclidean)
This commit is contained in:
@@ -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