round

round given value


Parameters

round value :integer :floating

Attributes

to:integerround to given decimal places

Returns

  • :floating

Examples

copy
print round 2.1 ; 2.0 print round 2.9 ; 3.0 print round 6 ; 6.0 print round pi ; 3.0

copy
print round.to:5 pi ; 3.14159 print round.to:2 pi ; 3.14

Related