Frac: Difference between revisions
From Vigyanwiki
Template>Crissov (3/9, 6/9; no ⅟ anymore) |
Template>Crissov (simpler code that should yield identical results) |
||
Line 1: | Line 1: | ||
<span class="frac nowrap">{{#if:{{{3 | <span class="frac nowrap">{{#if:{{{3|{{{2|}}}}}} | ||
|{{{ | |{{#if: {{{3|}}} |{{{1}}} |}}{{#switch: | ||
{{#expr: {{#if: {{{3|}}} | {{{2}}}/{{{3}}} | {{{1}}}/{{{2}}} }} }} | |||
|{{#expr:1/2}} = ½ | |||
|{{#expr:1/3}} = ⅓ | |||
|{{#expr:2/3}} = ⅔ | |||
|{{#expr:1/4}} = ¼ | |||
|{{#expr:3/4}} = ¾ | |||
|{{#expr:1/5}} = ⅕ | |||
|{{#expr:2/5}} = ⅖ | |||
|{{#expr:3/5}} = ⅗ | |||
|{{#expr:4/5}} = ⅘ | |||
|{{#expr:1/6}} = ⅙ | |||
|{{#expr:5/6}} = ⅚ | |||
|{{#expr:1/8}} = ⅛ | |||
|{{#expr:3/8}} = ⅜ | |||
|{{#expr:5/8}} = ⅝ | |||
|{{#expr:7/8}} = ⅞ | |||
|#default={{#if:{{{3|}}} | {{{2}}}⁄{{{3}}} | {{{1}}}⁄{{{2}}} }} | |||
| | |||
| | |||
| | |||
| | |||
|{{# | |||
|{{# | |||
| | |||
| | |||
| | |||
| | |||
| | |||
}} | }} | ||
|{{#switch:{{{1}}} | |{{#switch:{{{1}}} | ||
Line 106: | Line 28: | ||
|#default=1⁄{{{1|x}}} | |#default=1⁄{{{1|x}}} | ||
}} | }} | ||
}}</span><noinclude> | }}</span><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 04:40, 28 November 2012
1⁄x
Documentation
[create]