- Joined
- Aug 19, 2008
- Messages
- 491
Hey dudes!
Is there an easy way to round up a real number to the nearesttenth ten?
I.e 123.456 ~ 130
That would be totally epic, cause it will solve a very annoying bug in my project.
If there is no easy way I'll just have to implent it anyway
Help appreciated.
Cookie to first dude with proper solution
Solved!
by Shadow Deamon
Use this function to round a real
Is there an easy way to round up a real number to the nearest
I.e 123.456 ~ 130
That would be totally epic, cause it will solve a very annoying bug in my project.
If there is no easy way I'll just have to implent it anyway
Help appreciated.
Cookie to first dude with proper solution
Solved!
by Shadow Deamon
Use this function to round a real
JASS:
library MyFunctions
//call Round( real whichNumber, real whatNearest )
function Round takes real number, real nearest returns real
set number = R2I( number / nearest + 0.5 ) * nearest
return number
endfunction
endlibrary
Last edited: