From 26de548e3261fd2a2623d0e29a4f73a45d4fa216 Mon Sep 17 00:00:00 2001
From: Lars Mueller <appgurulars@gmx.de>
Date: Sun, 18 Jul 2021 15:11:11 +0200
Subject: [PATCH] Add negative and positive nan constants to math

---
 math.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/math.lua b/math.lua
index dc43e10..e3fa4d8 100644
--- a/math.lua
+++ b/math.lua
@@ -9,6 +9,9 @@ setfenv(1, _ENV)
 math.randomseed(minetest and minetest.get_us_time() or os.time() + os.clock())
 for _ = 1, 100 do math.random() end
 
+negative_nan = 0/0
+positive_nan = negative_nan ^ 1
+
 function round(number, steps)
 	steps = steps or 1
 	return math.floor(number * steps + 0.5) / steps