[SOLVED] Round to the Nearest Multiple of a Number

C

ChaosX2

Guest
Hello,

I'm trying to think of a way to round a number up to the nearest multiple of 64 but I'm having trouble on how to go about doing so. For example, if x is 5 and that's the value I want, then I want it to round up to 64. Likewise, if x is 120, I want it to round up to 124.

Any ideas? :x
 

Roderick

Member
All of those formulas will produce different results. Do some tests with all of them to see which one best suits your needs.
 
Top