diff options
| author | ruki <[email protected]> | 2025-11-24 22:55:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-24 22:55:57 +0800 |
| commit | 6effc61ddb1760190daae118dbe5b8534157ef19 (patch) | |
| tree | b78ee5bd92eed42d8482814b89c657d9e7de910f /xmake/core/base/math.lua | |
| parent | 15954d727029bf6eeda467f6f396a48800732d13 (diff) | |
improve math.nan
Diffstat (limited to 'xmake/core/base/math.lua')
| -rw-r--r-- | xmake/core/base/math.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/math.lua b/xmake/core/base/math.lua index 82dbdeb38..ce2e1c8b1 100644 --- a/xmake/core/base/math.lua +++ b/xmake/core/base/math.lua @@ -22,7 +22,7 @@ local math = math or {} -- init constants -math.nan = math.log(-1) +math.nan = 0/0 -- use 0/0 instead of math.log(-1) for better cross-platform compatibility (e.g., Solaris) math.e = math.exp(1) math.inf = 1/0 -- @see http://lua-users.org/wiki/InfAndNanComparisons |
