You don't get it. This was made in GameMaker Studio 1.4, which doesn't support a modulo operator. You know nothing about this specific framework. I have 8 years of experience and hacked governments. There's no reason to update it now, because it runs on a smart fridge at maximum capacity.
If small numbers are much more frequent, it's better to return early. Really, you should gather statistics about the numbers the function is called with, and put the most frequent ones at the top.
But this way your buddy in QA can build extra test cases and pay you back when he wins an award for most test cases created or some other corporate nonsense.
At least this madness is isolated to this function. It can easily be fixed.
Pirate’s code is just cluttered with magic numbers everywhere. Hard coded numbers that are referring to a big ”story array”, or characters. It’s just a giant web of complexity. The only fix is to start from scratch.
But, if this was his code he would defend it and condescendingly tell you that he is correct, you are not knowledgeable enough to understand and let you know he worked at Blizzard for seven years.
Did you know that he worked for Blizzard for seven years? Not only that, but he was Blizzard's first second-generation employee. He grew up in Blizzard. An extreme accomplishment to be certain. Thank you based and blizzpilled Pirate Software.
I wonder if he was the one stealing the breast milk. After all, I've heard he can be really childish.
Lol the amount of bullying this guy is getting lately. I've seen similar spins and bends that looks somewhat legit, making people believe he suck at coding
Pah, mathematicians and their generally applicable pure approach to solutions and fancy modulus operations, who needs 'em? Computing is applied and we always work with well-defined finite precision. Granted, writing the boilerplate for all possible 64 bit integers is a bit laborious, but we're programmers! That's what code generation is for.
I did his "optimized" shading trick for a game my friends and I built for a coding project in school.
Because the project was due in three hours and we realized that we didn't have any menus. So it was a matter of getting anything functional as menus(stage selection, button mapping, main menu.)
So the game itself capped at 60fps on the potato school computers, but the static menus only got 20fps.