BeigeAgenda, 7 months ago No its not the wrong solution! Premature optimization is a waste of time. Using if or case are not a solution because they are way too verbose and very easy to introduce an error. Modulo is a solution, and using bit-wise and is another faster solution.
No its not the wrong solution! Premature optimization is a waste of time.
Using if or case are not a solution because they are way too verbose and very easy to introduce an error.
Modulo is a solution, and using bit-wise and is another faster solution.