summaryrefslogtreecommitdiff
path: root/modules
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 /modules
parentb63f9b59615a4a63f1a45564d78243a2929c3c03 (diff)
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 'modules')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 9e974b6fdc..58620f2b3e 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -240,10 +240,10 @@
</method>
</methods>
<constants>
- <constant name="PI" value="3.141593">
+ <constant name="PI" value="3.14159265358979">
Constant that represents how many times the diameter of a circle fits around its perimeter. This is equivalent to [code]TAU / 2[/code].
</constant>
- <constant name="TAU" value="6.283185">
+ <constant name="TAU" value="6.28318530717959">
The circle constant, the circumference of the unit circle in radians.
</constant>
<constant name="INF" value="inf">