Round to n decimals
Round a number to n decimal places.
Contributors: LuYifei2011
Scripts
Main
define Round (num :: custom-arg) to (n :: custom-arg) bits set [result v] to ((round ((num :: custom-arg) * ([10 ^ v] of (n :: custom-arg)))) / ([10 ^ v] of (n :: custom-arg)))
Variables / Lists
| Name | Type | Scope |
|---|---|---|
result | Variable | Sprite |