Performing division on a variable seems to produce incorrect results. Take the following output for example:
int non_arg = 120;
Trace(interval); // Interval provided as an argument; outputs 120.
Trace(interval / 2); // Expected 60; outputs -4.4245.
Trace(non_arg / 2); // Expected 60; outputs -4.4245.
Trace(120 / 2); // Outputs 60.
While performing division on literals works fine, performing the same operation on a variable produces a completely different (and wrong) result.
MarioBrosCom wrote:Performing division on a variable seems to produce incorrect results. Take the following output for example:
int non_arg = 120;
Trace(interval); // Interval provided as an argument; outputs 120.
Trace(interval / 2); // Expected 60; outputs -4.4245.
Trace(non_arg / 2); // Expected 60; outputs -4.4245.
Trace(120 / 2); // Outputs 60.
While performing division on literals works fine, performing the same operation on a variable produces a completely different (and wrong) result.
One of my scripts uses division and it started acting weird too on the newer builds.
60.0000
60.0000
Probably fixed now. (Might want to retest it though). 😊