Difference between revisions of "Template:Dec2Hex"

From Ōkami Speedrun Wiki
Jump to navigation Jump to search
(fix prefix 0s)
(see also)
 
Line 8: Line 8:
#ifexpr: {{#len: {{{1}}} }} > 1 and floor({{{1}}} / 16) > 0 | {{hexchr|{{#expr: {{{1}}} / 16        mod 16}} }} }}{{
#ifexpr: {{#len: {{{1}}} }} > 1 and floor({{{1}}} / 16) > 0 | {{hexchr|{{#expr: {{{1}}} / 16        mod 16}} }} }}{{
#ifexpr: {{#len: {{{1}}} }} > 0 | {{hexchr|{{#expr: {{{1}}}            mod 16}} }} }} }} | <strong class="error">String too long.</strong> }}</includeonly><noinclude>
#ifexpr: {{#len: {{{1}}} }} > 0 | {{hexchr|{{#expr: {{{1}}}            mod 16}} }} }} }} | <strong class="error">String too long.</strong> }}</includeonly><noinclude>
Modified from [https://1710-wiki.terrafirmacraft.com/Template:Decimal_to_hexadecimal_converter TerrafirmaCraft Wiki].
Modified from [https://1710-wiki.terrafirmacraft.com/Template:Decimal_to_hexadecimal_converter TerrafirmaCraft Wiki]. See also [[:Template:Hex2Dec]].


{| class="wikitable"
{| class="wikitable"

Latest revision as of 07:15, 12 July 2025

Modified from TerrafirmaCraft Wiki. See also Template:Hex2Dec.

Example syntax Example output
{{Dec2Hex|1000000}}
F4240