User:BryghtShadow/sandbox/fraction

From Guild Wars 2 Wiki
Jump to navigationJump to search

0

Documentation[edit]

This template takes a decimal number and converts the fraction part into the appropriate character entity. Only supports quarter fractions, i.e. 0.25, 0.5, and 0.75. Any other fraction will simply be returned as input.

Usage[edit]

{{fraction|<number>}}
Examples
number code result
-0.5 {{fraction|-0.5}}
-1.2 {{fraction|-1.2}} -1.2
-0 {{fraction|-0}} -0
0 {{fraction|0}} 0
0.25 {{fraction|0.25}} ¼
0.50 {{fraction|0.50}} ½
0.5 {{fraction|0.5}} ½
0.75 {{fraction|0.75}} ¾
2.0 {{fraction|2.0}} 2
5.25 {{fraction|5.25}}
10 {{fraction|10}} 10
10.25 {{fraction|10.25}} 10¼
100 {{fraction|100}} 100
a {{fraction|a}} a
e {{fraction|e}} 2.718281828459