When typing math operation in editor, the precedence of operations is wrong. Either it’s from right to left, or the multiplication have bigger priority than division.
If I type 10 / 2 * 2 It should be: 10 / 2 * 2 5 * 2 = 10, but editor says it;s 2.5
![]()
![]()
When typing math operation in editor, the precedence of operations is wrong. Either it’s from right to left, or the multiplication have bigger priority than division.
If I type 10 / 2 * 2 It should be: 10 / 2 * 2 5 * 2 = 10, but editor says it;s 2.5
![]()
![]()
Looks correct. The order is Left to Right a*b a/b a%b …
http://en.cppreference.com/w/cpp/language/operator_precedence
So it would equate to 2*2 = 4
then 10 / 4 = 2.5
I guess you could always type it like this (10/2)*2

The order being from left to right means that the first operation form left, which is / should be computed first. I attach C++ code from Visual Studio 201.
It’s still an issue.
Subtraction and divisions are left-associative. This is a fact, it’s not negotiable and the calculations done by the UE are just wrong.
=== === === === ===
UE - right-associative → WRONG
5-5-5=5 → (5)-(5-5)
10/10/10=10 → (10)/(10/10)
=== === === === ===
conventional math - left-associative → CORRECT
5-5-5=-5 → (5-5)-(5)
10/10/10=0.1 → (10/10)/(10)
=== === === === ===
Please fix it
It’s not correct. I’ve just come to post the same issue and found this thread. I was getting weird results as I hadn’t expanded my fields wide enough to notice the result was wrong. It’s not a c++ concern, it’s pure maths.
It is easy to get around - with parentheses as you say or just manually catering for UE4 doing it incorrectly, or just using any other calculator - but it tricks up people who know operator precedence and associativity well and don’t think twice about it being interpreted incorrectly.