In mathematics, how to get the closest number to a number that is divisible by 16?
For example, I get a random number 100, and I want to rotate this number (using a mathematical function) to the nearest number to 100, which is divisible by 16 (in this case its 96)
I am trying to do this in JavaScript, but if I knew the mathematical formula for this, I would easily do it in any language.
Thanks, Relationship
javascript
user572420
source share