I’m having trouble thinking of a solution to this problem that doesn’t involve a loop. Basically, if something is greater than some arbitrary number, it loops around. Let’s say 64 is the number.
0 => 0
32 => 32
64 => 64
96 => 32
128 => 64
160 => 32
192 => 64
Et cetera.
The way I’m currently doing it involves a while loop that checks to see if the value is over 64 and if it is, subtract 64 from it. Is there another way to do it that doesn’t involve loops?
I’m using C# WinForms.
1 Answer