Difference between revisions of "Template:Sfrac"

From RimWorld Wiki
Jump to navigation Jump to search
m
Line 2: Line 2:
 
  -->style="display:inline-block; vertical-align:-0.5em; font-size:85%; text-align:center;"><!--
 
  -->style="display:inline-block; vertical-align:-0.5em; font-size:85%; text-align:center;"><!--
 
   --><span style="display:block; line-height:1em; padding:0 0.1em;">{{#if:{{{3|}}}|{{{2}}}|{{#if:{{{2|}}}|{{{1}}}|1}}}}</span><!--
 
   --><span style="display:block; line-height:1em; padding:0 0.1em;">{{#if:{{{3|}}}|{{{2}}}|{{#if:{{{2|}}}|{{{1}}}|1}}}}</span><!--
  --><span class="visualhide">/</span><!--
 
 
   --><span style="display:block; line-height:1em; padding:0 0.1em; border-top:1px solid;">{{{3|{{{2|{{{1}}}}}}}}}</span><!--
 
   --><span style="display:block; line-height:1em; padding:0 0.1em; border-top:1px solid;">{{{3|{{{2|{{{1}}}}}}}}}</span><!--
 
  -->{{#if:{{{3|}}}|</span>}}<!--
 
  -->{{#if:{{{3|}}}|</span>}}<!--
--></span>
+
--></span><noinclude>{{Documentation}}</noinclude>

Revision as of 12:31, 2 May 2023

1{{{1}}}

Documentation icon Template documentation[view] [edit] [history] [purge]

Formats a fraction

  1. First parameter is the scalar
  2. Second paramater is the numerator
  3. Third parameter is the denominator
{{Sfrac|1|2|3}}

results in: 1 23

This is text before {{Sfrac|421g|abc345|8989}} this is text after

results in: This is text before 421g abc3458989 this is text after

Before {{Sfrac||2|3}} after

results in: Before  23 after


Before {{Sfrac||{{Cross}}{{RimworldIcon}}|{{Check}}{{RoyaltyIcon}}}} after

results in: Before  Ex.pngContent from Rimworld core game onlyCheck.pngContent added by the Royalty DLC after