Template:Decimals/doc: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "{{Documentation}} The '''Decimals''' template is used to format a number, up to '''5 decimals'''. ==Usage== {{t|decimals|number|decimals}} '''Note:''' The maximum number for ''decimals'' is limited to 5, but this value can be increased if required. ==Examples== * {{t|decimals|1234|-2}} yields {{decimals|1234|-2}} * {{t|decimals|1234|0}} yields {{decimals|1234|0}} * {{t|decimals|1234|1}} yields {{decimals|1234|1}} * {{t|decimals|1234|2}} yields {{decimals|1234|2}} * {{...") |
(No difference)
|
Latest revision as of 01:23, 17 October 2024
The Decimals template is used to format a number, up to 5 decimals.
Usage
{{decimals|number|decimals}}
Note: The maximum number for decimals is limited to 5, but this value can be increased if required.
Examples
.0
{{decimals|1234|2}}
yields 1234
.0 0
{{decimals|9/8|5}}
yields 1.125
0 0
{{decimals|1/3|5}}
yields 0.33333 (only the first 5 digits are returned){{decimals|22/7|5}}
yields 3.14286 (only the first 5 digits are returned){{decimals|1/33|5}}
yields 0.0303
0
{{decimals|0.006|1}}
yields 0
.0