• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[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