Replies: 2 comments 1 reply
-
One time on RocketChat I asked why |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue:
The modulo operator (%) in GDScript currently operates only on integers. When used with floating-point operands, it throws the given error:
Invalid operands to operator %, float and float.
Proposed Solution:
To perform modulo operations on floating-point numbers in GDScript, the only way I know of is to use the fmod() function. I spent 30 minutes looking for a solution when I could've used fmod() instead. It would be helpful if the script language could warn the user about this limitation and suggest using fmod() function.
Beta Was this translation helpful? Give feedback.
All reactions