summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-proclayouts.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-05-31 13:43:29 -0400
committerNeil Moore <neil@s-z.org>2014-05-31 13:43:29 -0400
commit0555b25a71a17a55a353b34aacdb48b36e26f48f (patch)
tree118e5c4a4b8451b33f9f597675cd41b5bd4af269 /crawl-ref/source/dgn-proclayouts.cc
parentbc2dfad1e5be1d88fd3c578a4183cf53572c1bca (diff)
downloadcrawl-ref-0555b25a71a17a55a353b34aacdb48b36e26f48f.tar.gz
crawl-ref-0555b25a71a17a55a353b34aacdb48b36e26f48f.zip
Replace a few uses of a <= b <= c (#8594)
One of them was incorrect, and the other correct but confusing.
Diffstat (limited to 'crawl-ref/source/dgn-proclayouts.cc')
-rw-r--r--crawl-ref/source/dgn-proclayouts.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/dgn-proclayouts.cc b/crawl-ref/source/dgn-proclayouts.cc
index df8c4e395d..8a0775aa70 100644
--- a/crawl-ref/source/dgn-proclayouts.cc
+++ b/crawl-ref/source/dgn-proclayouts.cc
@@ -553,7 +553,7 @@ double NoiseLayout::_optimum_range(const double val, const double rstart, const
}
double NoiseLayout::_optimum_range_mid(const double val, const double rstart, const double rmax1, const double rmax2, const double rend) const
{
- if (rmax1 <= val <= rmax2) return 1.0;
+ if (rmax1 <= val && val <= rmax2) return 1.0;
if (val <= rstart || val >= rend) return 0.0;
if (val < rmax1)
return (val - rstart) / (rmax1-rstart);