1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

magic texture adjustment: fixed the algorithm

This commit is contained in:
Zeno Rogue 2018-02-12 13:38:03 +01:00
parent 1b3de574a9
commit f0bb13e17c

View File

@ -596,7 +596,7 @@ void applyMagic() {
bool failed = false; bool failed = false;
for(ld delta = 1; delta > 1e-9; delta *= (failed ? -.7 : 1.2)) { for(ld delta = 1; abs(delta) > 1e-9; delta *= (failed ? -.7 : 1.2)) {
p.apply(delta); p.apply(delta);
ld nq = magic_quality(); ld nq = magic_quality();
if(nq < cq) { if(nq < cq) {