summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-09 03:01:04 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-09 03:01:04 +0900
commit24839d74b278b5898d2803a926461f5ac2e73711 (patch)
tree2750f1aa0e5ba0779f51c219ee02e249e9b83738 /include
parentee57789c724cb8bb86ebeda2dfd2ef585e996f68 (diff)
parent8a4faae55e16d91db067347a1f2a5f4beff2ee3b (diff)
downloadmruby-24839d74b278b5898d2803a926461f5ac2e73711.tar.gz
mruby-24839d74b278b5898d2803a926461f5ac2e73711.zip
Merge pull request #1834 from cremno/use-nan-and-infinity-macros
use NAN and INFINITY macros
Diffstat (limited to 'include')
-rw-r--r--include/mruby/value.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h
index d51fbb7bc..a940aabb7 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -72,6 +72,8 @@ typedef short mrb_sym;
# define PRIo64 "I64o"
# define PRIx64 "I64x"
# define PRIX64 "I64X"
+# define INFINITY ((float)(DBL_MAX * DBL_MAX))
+# define NAN ((float)(INFINITY - INFINITY))
# else
# include <inttypes.h>
# endif