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:
parent
1b3de574a9
commit
f0bb13e17c
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user