Snazz@lemmy.worldtoLemmy Shitpost@lemmy.world•I would personally just treat whatever direction I'm facing at the time as North and go from there.
4·
1 month agoIm think it was designed with a clock in mind. That’s why it starts with north at the 12:00 position and goes clockwise. I learned it as ‘Never Eat Soggy Waffles’ but I’m sure there are a bunch of these.
There are only 4.29 billion possible values of an int32, so even if you used 2 lines for each case, it’d still be under 10 billion lines of code
bool isOdd(int num) { if (num == 1) { return true; } if (num == 2) { return false; } if (num == 3) { return true; } … }