The [tws_round] ShortCode can be used to round up or down any float value passed as content to the ShortCode. It is an enclosing ShortCode, so anything “wrapped” within it will be rounded up or down (well, as long it is numbers).
round – int [number of decimals to round after comma] default2
dir – const [a valid PHP Round Constant] defaultPHP_ROUND_HALF_UP Possible values for dir
Rounds val away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.
Rounds val towards zero when it is half way there, making 1.5 into 1 and -1.5 into -1.
Rounds val towards the nearest even value when it is half way there, making both 1.5 and 2.5 into 2.
Rounds val towards the nearest odd value when it is half way there, making 1.5 into 1 and 2.5 into 3.
//Round DOWN a float value to no decimals after comma. Produces number 9
[round_values round="0" dir="PHP_ROUND_HALF_DOWN"]9.5[/round_values]
//Round UP a float value to 2 decimals. Produces 9.85