You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While mathematically, it's true the -0 == 0 (and Lua agrees with that), this is probably not expected behavior:
game.print("clamp of -0 is "..math.clamp(-0, 0, 100))
Results in:
clamp of -0 is -0
The desired output here would have been
clamp of -0 is 0
On the fence if this is a "bug" per se, but if people are using clamp (and in my case, using as a percentage), displaying "-0%" is a little ugly and slightly unexpected.
The text was updated successfully, but these errors were encountered:
While mathematically, it's true the -0 == 0 (and Lua agrees with that), this is probably not expected behavior:
game.print("clamp of -0 is "..math.clamp(-0, 0, 100))
Results in:
clamp of -0 is -0
The desired output here would have been
clamp of -0 is 0
On the fence if this is a "bug" per se, but if people are using clamp (and in my case, using as a percentage), displaying "-0%" is a little ugly and slightly unexpected.
The text was updated successfully, but these errors were encountered: