Does anyone here know why math functions are not grouped under some Math class in GDScript? #4202
SilencedPerson
started this conversation in
Scripting
Replies: 1 comment 3 replies
-
I personally find very valuable to have these functions available to the global scope. It makes the code more readable and less repetitive. It's probably why. ... Also, although it's been worked on, built-in static functions are not available, which means that for this to work "Math" would have to be a Singleton, which is... technically not necessary(?), nor exactly pretty and accessible to everyone, for the aforementioned reasons above. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The question is in the title but here is how Javascript does it and i find it very useful.
Beta Was this translation helpful? Give feedback.
All reactions