Changes
Added documentation of the new 'error' parameter. Note that it's not implemented in the _main function.
{{High-use|5588}}
{{Module rating|protected}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
== Usage ==
=== From other Lua modules ===
<syntaxhighlight lang="lua">
local roundAndPad = require('Module:Decimals')._main
result = roundAndPad(n, decimals)
</syntaxhighlight>
=== From wikitext ===
{{tlinv|Decimals|main|''n''|''decimals''[|error<nowiki>=</nowiki>''string to display instead of error message'']}}
For more information, see [[Template:Decimals]].
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
}}</includeonly>
{{Module rating|protected}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
== Usage ==
=== From other Lua modules ===
<syntaxhighlight lang="lua">
local roundAndPad = require('Module:Decimals')._main
result = roundAndPad(n, decimals)
</syntaxhighlight>
=== From wikitext ===
{{tlinv|Decimals|main|''n''|''decimals''[|error<nowiki>=</nowiki>''string to display instead of error message'']}}
For more information, see [[Template:Decimals]].
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
}}</includeonly>