How to do this?
Example: I have a couple of numbers: 16, 32, 48, 64, 80, 96 and so on, they increase by 16 each time.
How can I change a random number to the nearest of these numbers?
In this example the random number is 22 and 16 is the nearest number, so my answer is 16. A couple of more examples: 33=32, 61=64, 17=16
How to do this in code in a simple way?