diff options
author | Neil Moore <neil@s-z.org> | 2014-05-14 18:37:29 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-05-14 18:37:29 -0400 |
commit | 421201469985767f04827adb61886164ad01c2ff (patch) | |
tree | e4858162179b316ed3ea8f5036c3b039be84c8e9 /crawl-ref/source/worley.cc | |
parent | a417c40e72742548630588123da44dad5d4c9bfd (diff) | |
download | crawl-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/worley.cc')
-rw-r--r-- | crawl-ref/source/worley.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/worley.cc b/crawl-ref/source/worley.cc index 4b660e26c5..6b0b57e442 100644 --- a/crawl-ref/source/worley.cc +++ b/crawl-ref/source/worley.cc @@ -34,6 +34,7 @@ #include <math.h> #include <stdio.h> #include <stdint.h> +#include <cfloat> #include "worley.h" /* Function prototype */ namespace worley @@ -79,7 +80,7 @@ namespace worley first real sample tests. Note we'll be storing and comparing the SQUARED distance from the feature points to avoid lots of slow sqrt() calls. We'll use sqrt() only on the final answer. */ - for (i=0; i<max_order; i++) F[i]=1e38; + for (i=0; i<max_order; i++) F[i]=DBL_MAX; /* Make our own local copy, multiplying to make mean(F[0])==1.0 */ new_at[0]=DENSITY_ADJUSTMENT*at[0]; |