Template:Base/doc

From Nguhcraft Wiki
Revision as of 19:01, 5 July 2026 by Astaryuu (talk | contribs) (Created page with "This template formats a decimal number into a number in a given base. ===Usage=== <pre><nowiki> {{Base|number|radix|precision|numerals=str|format=separator}} </nowiki></pre> * '''number''': The number in decimal. * '''radix''': The base to convert to. * '''precision''': The number of digits after the decimal point. Optional; if not included, it defaults to 0. * '''numerals''': A series of numerals to use. <pre>str</pre> is the string of numerals in order from 0. Optiona...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This template formats a decimal number into a number in a given base.

Usage

{{Base|number|radix|precision|numerals=str|format=separator}}
  • number: The number in decimal.
  • radix: The base to convert to.
  • precision: The number of digits after the decimal point. Optional; if not included, it defaults to 0.
  • numerals: A series of numerals to use.
    str
    is the string of numerals in order from 0. Optional; if not included, it defaults to "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".
  • format: If separators are included in the output. If it is present, the separator is equal to
    separator
    . If format is not present, then the separator is ",". To disable separators, set format to an empty string.