Sunday, October 22, 2017

algorithm - Calculate 8 different directional input based on arrow keys combinations


Considering I have four variables event binded to each arrow key, that can be 0 or 1


My current approach to this issue is simply 8 nested ifs checking each combination or keys


Is there a more math-y clever way to solve this issue?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...