round

Round a number to an optional number of decimal places.

Syntax

{{ value | round }}{{ value | round:2 }}

Example

01

Basic usage

InputTS
1{2  "value": 3.141593}
TemplateKNAP
1{{ value | round:2 }}
OutputKNAP
13.14

Behavior

  • The optional non-negative parameter sets decimal places.