Scratch Modules Gallery

Round to n decimals

Round a number to n decimal places.

mathround

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

NameTypeScope
resultVariableSprite