1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-27 03:47:40 +00:00

intra:: fixed the mirroring on product ceiling portals

This commit is contained in:
Zeno Rogue
2021-10-02 14:01:22 +02:00
parent 49fcd23397
commit e70e2fc404
2 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ hyperpoint portal_data::to_poco(hyperpoint h) const {
h[1] /= h[2];
h[2] = dec.first - d;
h[3] = 1;
if(d<0) h[2] = -h[2];
if(d<0) h[2] = -h[2], h[0] = -h[0];
return h;
}
else if(prod && kind == 0) {
@@ -73,7 +73,7 @@ hyperpoint portal_data::to_poco(hyperpoint h) const {
hyperpoint portal_data::from_poco(hyperpoint h) const {
if(prod && kind == 1) {
ld xd = h[2];
if(d<0) xd = -xd;
if(d<0) xd = -xd, h[0] = -h[0];
h[2] = 1;
auto z = product_decompose(h).first;
return h * exp(d+xd-z);