summaryrefslogtreecommitdiff
path: root/prelude
diff options
context:
space:
mode:
Diffstat (limited to 'prelude')
-rw-r--r--prelude/slang-cpp-prelude.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/prelude/slang-cpp-prelude.h b/prelude/slang-cpp-prelude.h
index d15abdb88..2b848dc3b 100644
--- a/prelude/slang-cpp-prelude.h
+++ b/prelude/slang-cpp-prelude.h
@@ -43,6 +43,11 @@
#define SLANG_PRELUDE_EXPORT_START SLANG_PRELUDE_EXTERN_C_START SLANG_PRELUDE_SHARED_LIB_EXPORT
#define SLANG_PRELUDE_EXPORT_END SLANG_PRELUDE_EXTERN_C_END
+#ifndef INFINITY
+// Must overflow for double
+# define INFINITY float(1e+300 * 1e+300)
+#endif
+
#ifndef SLANG_INFINITY
# define SLANG_INFINITY INFINITY
#endif