I came across a really strange quirk today while coding a "shield" health system:
var Armor = 50.0
Armor -= amount * 2 / 3
This sets armor to the expected value (~16.66), however:
Armor -= amount * (2 / 3)
This does not subtract anything from the armor. Armor remains at 50.
I prefer to have my fractions formatted in parentheses for more readable code. Why does this make a difference?