diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-05-20 22:49:39 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-07-15 12:24:59 +0300 |
commit | 0181c3dde12d2bcfdcbb463dcf90cf47f0b88fee (patch) | |
tree | 243cf8ce8ce84721f77b693f2517f9deb507ea04 /core/ustring.cpp | |
parent | dad21acebdfc9df195068c94ee40629d34365036 (diff) | |
download | redot-engine-0181c3dde12d2bcfdcbb463dcf90cf47f0b88fee.tar.gz |
Docs: Ignore OS specific values (constants, project settings, properties).
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 5d3cf5f1a4..572ad1af59 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -1025,6 +1025,9 @@ String String::chr(CharType p_char) { } String String::num(double p_num, int p_decimals) { + if (Math::is_nan(p_num)) { + return "nan"; + } #ifndef NO_USE_STDLIB if (p_decimals > 16) { @@ -1313,6 +1316,9 @@ String String::num_real(double p_num) { } String String::num_scientific(double p_num) { + if (Math::is_nan(p_num)) { + return "nan"; + } #ifndef NO_USE_STDLIB char buf[256]; |