((false?1:0)-(true?1:0))
This evaluates to 4294967295 (hex 0xFFFFFFFF), perhaps because the literals are being treated as unsigned. The expression (0-1) yields -1, though it's likely computed at compile time.
Is this a bug or a feature?
Code that produced the issue:
//The white box soldiers on, knowing the fate of the world rests squarely on his shoulders.
heroPos.x += .005f*((Keyboard.right.held?1:0)-(Keyboard.left.held?1:0));
heroPos.y += .005f*((Keyboard.up.held?1:0) -(Keyboard.down.held?1:0));
Not a huge issue but a thing. The C++ programmer in me wishes AS booleans were math-friendly like their counterparts in native code, but I guess I can understand the reasons for avoiding that.
If I continue using this forum you'll notice my habit of striving for terse code borders on obsession.