Template:Round
From Guild Wars Wiki 中文站
Jump to navigationJump to search
Description
This template allows to round given numbers using on the common rounding functions floor and ceiling to integer values.
Parameters
- unnamed parameter 1
- Number you want to round.
- unnamed parameter 2
- Optional. Rounding function. Accepts the following values:
floor- Using the mathematical floor function to return the highest integer less than or equal to the given number.ceil- Using the mathematical ceiling function to return the smallest integer not less than the given number.- defaults to the normal Symmetric Arithmetic Rounding function to return the rounded value.
Examples
{{round|15.76}} = 16{{round|15.76|floor}} = 15{{round|15.76|ceil}} = 16
{{round|4.37}} = 4{{round|4.37|floor}} = 4{{round|4.37|ceil}} = 5