/ Published in: ActionScript 3
URL: http://www.johncblandii.com/index.php/2009/01/as3-rounding-to-nearest-n.html
syntax:
roundToNearest(45, YourValueHere);
Expand |
Embed | Plain Text
function roundToNearest(roundTo:Number, value:Number):Number{ return Math.round(value/roundTo)*roundTo; }
You need to login to post a comment.
