![]() |
Operator Precedence
I'm makeing a jump function, and this precedence of operators is really screwing me up.
2*(dy-v*t)/t^2 != 2*(dy-v*t)/(t^2) Shouldn'y the ^ operator have a higher precedence than all of the other operators? |
No, even in C it isn't.
|
Quote:
|
What's so bad about adding the () anyway?
|
Quote:
|
Quote:
Quote:
|
Quote:
|
I recommend adding brackets whenever you are unsure about the results, since there are a lot of operators in Graal. But it is true that the order of operations is not correct, it is treating multiplication and division with the same priority as exponents, while exponents should be calculated first, like in v2.
I have fixed it, the npcservers need to be restarted. |
Quote:
|
| All times are GMT +2. The time now is 08:46 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.