This article has moved to a new home. View the updated version Base Tag Library

round

Rounds a figure based on the parameters

Example

[%round value:'11.65' dp:'1'/%]

Usage

The round tag lets you round a number to the closest decimal place as specified in the DP param.

In our example, the result would be 11.7 as we are rounding 11.65 to a decimal place of 1.

round Parameters

Name Options Description
value:'' String The value you will round
dp:'' Integer The decimal place you will round the Value to, can not be used with the nearest param.
nearest:'' Integer Rounds to the nearest whole number, can not be used with the dp param.