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
This improves clarity and results in the same functionality.
Proof that functionality does not change:
(1) the referenced line of code is only reachable when the two if conditions are met: pStateNew[i] != pStateOld[i] && pStateNew[i]
(2) therefore, the line of code is reached when the button was not active on the previous frame but active on the current frame
(3) therefore, since the button was not active on the previous frame, pKeys[i].bHeld == false
(4) therefore, !pKeys[i].bHeld == true always
The step I might be wrong is (3). Let me know if I am missing some way where pKeys[i].bHeld == true and the button be inactive on the previous frame.
The text was updated successfully, but these errors were encountered:
I believe the line
should be changed to
This improves clarity and results in the same functionality.
Proof that functionality does not change:
(1) the referenced line of code is only reachable when the two
if
conditions are met:pStateNew[i] != pStateOld[i] && pStateNew[i]
(2) therefore, the line of code is reached when the button was not active on the previous frame but active on the current frame
(3) therefore, since the button was not active on the previous frame,
pKeys[i].bHeld == false
(4) therefore,
!pKeys[i].bHeld == true
alwaysThe step I might be wrong is (3). Let me know if I am missing some way where
pKeys[i].bHeld == true
and the button be inactive on the previous frame.The text was updated successfully, but these errors were encountered: