1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-02 12:19:18 +00:00

fixed the orientation of the half-plane

This commit is contained in:
Zeno Rogue 2018-10-25 03:17:30 +02:00
parent cbb53cfe68
commit 2b79e9d0c7

View File

@ -440,14 +440,19 @@ void applymodel(hyperpoint H, hyperpoint& ret) {
x0 /= -rad; x0 /= -rad;
y0 += .5; y0 += .5;
conformal::apply_orientation(y0, x0); conformal::apply_orientation(x0, y0);
auto& ps = conformal::halfplane_scale; auto& ps = conformal::halfplane_scale;
x0 *= ps, y0 *= ps; x0 *= ps, y0 *= ps;
ret[0] = -conformal::osin + x0; ret[0] = -conformal::osin - x0;
if(wmspatial || mmspatial) { if((wmspatial || mmspatial) && zlev) {
y0 = y0 * pow(zlev, conformal::ocos); if(conformal::ocos)
y0 = y0 * pow(zlev, conformal::ocos);
if(conformal::ocos && conformal::osin)
y0 += x0 * conformal::osin * (pow(zlev, conformal::ocos) - 1) / conformal::ocos;
else if(conformal::osin)
y0 += x0 * conformal::osin * log(zlev);
} }
ret[1] = conformal::ocos + y0; ret[1] = conformal::ocos + y0;
ret[2] = 0; ret[2] = 0;