round

功能說明

將數值四捨五入。預設為四捨五入到整數,也可以指定保留的小數位數。


語法

{{ 數值 | round }}
{{ 數值 | round: 小數位數 }}

範例

{{ 3.6 | round }}
4
{{ 3.14159 | round: 2 }}
3.14