So, I have learn the hard way that tertiary operators are confusing to some people. (Never was to me.)
At some point while I was developing a game, I was presented with the task of fixing a bug related to running backward & while strafing. I look at the code.
(pseudo code btw)
if(isRunning)
movespeed = normalSpeed * runSpeed;
else
movespeed = normalSpeed;
and so, I did the only thing that made sense to me to simplify the block of if-else that would ensue with restricting the run.
if(isRunning) ( if(isMovingForward) (normalSpeed * runSpeed) : (if(canRunSideway && movingSideway || canRunBackward && movingBackward) normalSpeed * runSpeed : normalSpeed ) ) : (normalSpeed);
In hindsight, I can see why someone wouldn't understand such a line.