summaryrefslogtreecommitdiffstats
path: root/core/core_bind.h
diff options
context:
space:
mode:
authorHeikki Simojoki <heikki.simojoki@gmail.com>2019-12-23 17:38:33 +0200
committerAaron Franke <arnfranke@yahoo.com>2021-05-29 11:24:57 -0400
commit09a905ca8066c86951b23023a9e1950f277ae8f4 (patch)
tree8dd07afa6032e2cbd7349a94251676bd15500f63 /core/core_bind.h
parentb63f9b59615a4a63f1a45564d78243a2929c3c03 (diff)
downloadredot-engine-09a905ca8066c86951b23023a9e1950f277ae8f4.tar.gz
Increase String::num default decimal precision
Fixes #34541 Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the amount of digits after the decimal point. Increased MAX_DECIMALS to 32, and made String::num use MAX_DECIMALS consistently. If -1 is passed as decimal precision to String::num, it now gets changed to the correct precision based on the number's magnitude, instead of using printf default(which is 6) String::num_real also calculates the correct precision now. Also made the types used in floating-point math more consistent in a few places.
Diffstat (limited to 'core/core_bind.h')
-rw-r--r--core/core_bind.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/core_bind.h b/core/core_bind.h
index be8b30b38d..3c63304488 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -705,7 +705,7 @@ protected:
public:
static _JSON *get_singleton() { return singleton; }
- String print(const Variant &p_value, const String &p_indent = "", bool p_sort_keys = false);
+ String print(const Variant &p_value, const String &p_indent = "", bool p_sort_keys = false, bool p_full_precision = false);
Ref<JSONParseResult> parse(const String &p_json);
_JSON() { singleton = this; }