Template:Number: Difference between revisions

From The Perfect Tower II
Jump to navigation Jump to search
Lmnt0 (talk | contribs)
Created page with "<includeonly>{{#invoke:FormatNumber|main}}</includeonly><noinclude> <templatedata> { "params": { "1": { "label": "Number", "description": "The number to format (in lo..."
 
Lmnt0 (talk | contribs)
Update templatedata
Line 5: Line 5:
"1": {
"1": {
"label": "Number",
"label": "Number",
"description": "The number to format (in long form or scientific notation)",
"description": "The number to display (in long form or scientific notation)",
"example": "1e7",
"example": "10,000,000 or 1e7",
"required": true,
"type": "number",
"type": "number"
"required": true
},
},
"format": {
"format": {
Line 14: Line 14:
"description": "Force a specific format (named or scientific). If blank, displays both named and scientific (preferred)",
"description": "Force a specific format (named or scientific). If blank, displays both named and scientific (preferred)",
"example": "named",
"example": "named",
"type": "string"
},
"prefix": {
"label": "Prefix",
"description": "Add an optional prefix to the number",
"example": "$",
"type": "string"
},
"suffix": {
"label": "Suffix",
"description": "Add an optional suffix to the number",
"example": "%",
"type": "string"
"type": "string"
}
}
},
},
"description": "Show a large number in named and/or scientific notations, matching in-game formatting",
"description": "Display a large number in named and/or scientific notations, matching in-game formatting",
"format": "inline"
"format": "inline"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Revision as of 18:20, 19 March 2021

Display a large number in named and/or scientific notations, matching in-game formatting

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Number1

The number to display (in long form or scientific notation)

Example
10,000,000 or 1e7
Numberrequired
Formatformat

Force a specific format (named or scientific). If blank, displays both named and scientific (preferred)

Example
named
Stringoptional
Prefixprefix

Add an optional prefix to the number

Example
$
Stringoptional
Suffixsuffix

Add an optional suffix to the number

Example
%
Stringoptional