summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-tornado.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-05-14 18:37:29 -0400
committerNeil Moore <neil@s-z.org>2014-05-14 18:37:29 -0400
commit421201469985767f04827adb61886164ad01c2ff (patch)
treee4858162179b316ed3ea8f5036c3b039be84c8e9 /crawl-ref/source/spl-tornado.cc
parenta417c40e72742548630588123da44dad5d4c9bfd (diff)
downloadcrawl-ref-421201469985767f04827adb61886164ad01c2ff.tar.gz
crawl-ref-421201469985767f04827adb61886164ad01c2ff.zip
Remove some hard-coded 1e38s (floatingatoll, Grunt).
And replace them with DBL_MAX, which could theoretically be as low as 1e37.
Diffstat (limited to 'crawl-ref/source/spl-tornado.cc')
-rw-r--r--crawl-ref/source/spl-tornado.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc
index eb49d25a22..1b8e4d2901 100644
--- a/crawl-ref/source/spl-tornado.cc
+++ b/crawl-ref/source/spl-tornado.cc
@@ -1,5 +1,6 @@
#include "AppHdr.h"
#include <math.h>
+#include <cfloat>
#include "spl-damage.h"
@@ -173,7 +174,7 @@ static coord_def _rotate(coord_def org, coord_def from,
return from;
coord_def best = from;
- double hiscore = 1e38;
+ double hiscore = DBL_MAX;
double dist0 = sqrt((from - org).abs());
double ang0 = atan2(from.x - org.x, from.y - org.y) + rdur * 0.01;
@@ -192,7 +193,7 @@ static coord_def _rotate(coord_def org, coord_def from,
}
// must find _something_, the original space might be already taken
- ASSERT(hiscore != 1e38);
+ ASSERT(hiscore != DBL_MAX);
return best;
}