Template:Base
Jump to navigation
Jump to search
A{{{2}}}
This template formats a decimal number into a number in a given base.
Usage
{{Base|number|radix|precision|numerals=str|format=true|separator=sep|point=pt|displaynum=disp}}
- 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.
stris 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 and equal to false, there are no separators. If it is not present, there are separators.
- separator: The separator to be used when formatted. Equal to
sep. If separator is not present, then the separator is ",". To be sure the space appears when using a space separator, use the HTML code . - point: The mark used between the integral and fractional component. Equal to
pt. If point is not present, then the mark is ".". - displaynum: The number to display in the ruby text. Equal to
disp. If it is not present, it will be equal to number. You can use this to ensure the displayed value is correct even if you have to use an incorrect decimal value, such as using 12.34 for 12 and a third, but preferring it displayed as 12.33.