Шаблон:Round
Материал из Guild Wars 2 wiki
Версия от 12:53, 20 августа 2013; Snowbirdie (обсуждение | вклад) (Новая страница: «<includeonly>{{ #if: {{{1|}}} | {{ #switch: {{{2|}}} | floor = {{ #ifexpr: {{{1}}} round 0 > {{{1}}} | {{ #expr: {{{1}}} - 0.5 round 0 }} | {{ #expr: {{{1}}} r…»)
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