Difference between revisions of "User:PROXiCiDE/MathUtil"
Jump to navigation
Jump to search
m
no edit summary
imported>PROXiCiDE m (added function: Round) |
imported>PROXiCiDE m |
||
Line 115: | Line 115: | ||
;================================================================================= | ;================================================================================= | ||
Int Function Round(Float afValue, Int iMult = 10, Int iMode = 0) | Int Function Round(Float afValue, Int iMult = 10, Int iMode = 0) | ||
If iMode == 1 ; Round Up | If iMode == 1 ; Round Up | ||
Return Math.Ceiling(afValue / iMult) * iMult | Return Math.Ceiling(afValue / iMult) * iMult |