![]() | This is the template test cases page for the sandbox of Template:Resratio. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Empty Ratio
{{Resratio}}
→ 0{{Resratio/sandbox}}
→ 0
Float Ratio, 1 digit
{{Resratio|1.3}}
→ 1.3{{Resratio/sandbox|1.3}}
→ 1.3
Float Ratio, 2 digits
{{Resratio|1.33}}
→ 4∶3{{Resratio/sandbox|1.33}}
→ 4∶3
Float Ratio, 3 digits
{{Resratio|1.333}}
→ 4∶3{{Resratio/sandbox|1.333}}
→ 4∶3
Float Ratio, 4 digits
{{Resratio|1.3333}}
→ 4∶3{{Resratio/sandbox|1.3333}}
→ 4∶3
Float Ratio, 2 digits with rounding error
{{Resratio|1.34}}
→ 1.34{{Resratio/sandbox|1.34}}
→ 1.34
Colon Ratio, width > height
{{Resratio|4:3}}
→ 4∶3{{Resratio/sandbox|4:3}}
→ 4∶3
Colon Ratio, height > width
{{Resratio|3:4}}
→ 3:4{{Resratio/sandbox|3:4}}
→ 3:4
Colon Ratio, unnecessary factor to achieve y=9
{{Resratio|12:9}}
→ 4∶3{{Resratio/sandbox|12:9}}
→ 4∶3
Colon Ratio, unnecessary factor to achieve x=16
{{Resratio|16:12}}
→ 4∶3{{Resratio/sandbox|16:12}}
→ 4∶3
Unsupported Colon Ratio
{{Resratio|23:7}}
→ 23:7{{Resratio/sandbox|23:7}}
→ 23:7
Width-Height Ratio, 4:3
{{Resratio|x=4 |y=3}}
→ 4∶3{{Resratio/sandbox|x=4 |y=3}}
→ 4∶3
Width-Height Ratio, VGA
{{Resratio|x=640 |y=480}}
→ 4∶3{{Resratio/sandbox|x=640 |y=480}}
→ 4∶3
Width-Height Ratio, single digit
{{Resratio|x=1.3 |y=1}}
→ 5.8546795155817E+15∶4.5035996273705E+15{{Resratio/sandbox|x=1.3 |y=1}}
→ 1.3∶1
Width-Height Ratio, double digit
{{Resratio|x=1.33 |y=1.00}}
→ 4∶3{{Resratio/sandbox|x=1.33 |y=1.00}}
→ 4∶3
Width-Height Ratio, quadruple digit
{{Resratio|x=1.3333 |y=1.0000}}
→ 4∶3{{Resratio/sandbox|x=1.3333 |y=1.0000}}
→ 4∶3
Unsupported Width-Height Ratio
{{Resratio|x=23 |y=7}}
→ 23∶7{{Resratio/sandbox|x=23 |y=7}}
→ 23∶7
Unsupported Width-Height Ratio as float
{{Resratio|f=true |x=23 |y=7}}
→ 3.2857{{Resratio/sandbox|f=true |x=23 |y=7}}
→ 23∶7
Unsupported Width-Height Ratio that can be simplified
{{Resratio|x=905 |y=500}}
→ 181∶100{{Resratio/sandbox|x=905 |y=500}}
→ 181∶100
Empty Ratio, 1
{{Resratio|}}
→ x∶y{{Resratio/sandbox|}}
→ x∶y
Empty Ratio, 1 & 2
{{Resratio||}}
→ x∶{{Resratio/sandbox||}}
→ x∶y
Zero Ratio, x
{{Resratio|x=0}}
→ 0{{Resratio/sandbox|x=0}}
→ 0
Zero Ratio, y
{{Resratio|y=0}}
→ 0{{Resratio/sandbox|y=0}}
→ 0
Zero Ratio, x & y
{{Resratio|x=0 |y=0}}
→ 0{{Resratio/sandbox|x=0 |y=0}}
→ 0
Zero Ratio, 1 & 2
{{Resratio|0|0}}
→ 0{{Resratio/sandbox|0|0}}
→ 0
Redundant parameters
{{Resratio|1|2|x=3 |y=4}}
→ 3∶4{{Resratio/sandbox|1|2|x=3 |y=4}}
→ 3∶4
Named Ratio
{{Resratio|phi}}
→ ϕ∶1{{Resratio/sandbox|phi}}
→ ϕ∶1
Named Ratio
{{Resratio|Golden}}
→ ϕ∶1{{Resratio/sandbox|Golden}}
→ ϕ∶1
Named Ratio
{{Resratio|φ}}
→ ϕ∶1{{Resratio/sandbox|φ}}
→ ϕ∶1
Named Ratio
{{Resratio|plastic}}
→ ρ∶1{{Resratio/sandbox|plastic}}
→ ρ∶1
Named Ratio
{{Resratio|platin}}
→ platin{{Resratio/sandbox|platin}}
→ platin
Named Ratio
{{Resratio|sqrt2}}
→ √2∶1{{Resratio/sandbox|sqrt2}}
→ √2∶1
Tests that should yield 1∶1
edit{{Resratio}}
{{Resratio|1}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1:1}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|~1:1}}
~1:1 | ~1:1 |
{{Resratio}}
{{Resratio|-1:1}}
-1:1 | -1:1 |
{{Resratio}}
{{Resratio|1|}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.000|}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1:1|}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.0}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.00}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.000}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.0000}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1|1}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.0|1.0}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.0|1}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1|1.0}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.000|1}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|0.999999}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|0.99999}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|0.9999}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|0.999}}
0.999 | 0.999 |
{{Resratio}}
{{Resratio|1.000001}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.00001}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.0001}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1.001}}
1.001 | 1.001 |
{{Resratio}}
{{Resratio|1|f=}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1||f=}}
1∶1 | 1∶1 |
Tests that should not yield 1∶1
edit{{Resratio}}
{{Resratio|1,000}}
1,000 | 1,000 |
{{Resratio}}
{{Resratio|0.9990}}
0.9990 | 0.9990 |
{{Resratio}}
{{Resratio|0.99}}
0.99 | 0.99 |
{{Resratio}}
{{Resratio|0.9}}
0.9 | 0.9 |
{{Resratio}}
{{Resratio|1.0009}}
1.0009 | 1.0009 |
{{Resratio}}
{{Resratio|1.01}}
1.01 | 1.01 |
{{Resratio}}
{{Resratio|1.1}}
11∶10 | 11∶10 |
{{Resratio}}
{{Resratio|1|f}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1|f|}}
1∶1 | 1∶1 |
{{Resratio}}
{{Resratio|1|f=yes}}
1 | 1 |
{{Resratio}}
{{Resratio|1|f=on}}
1 | 1 |
{{Resratio}}
{{Resratio|1|f=true}}
1 | 1 |
{{Resratio}}
{{Resratio|1|f=1}}
1∶1 | 1 |
{{Resratio}}
{{Resratio|1|f=0}}
1 | 1 |
{{Resratio}}
{{Resratio|1|f=no}}
1 | 1 |
{{Resratio}}
{{Resratio|1|f=off}}
1 | 1 |
{{Resratio}}
{{Resratio|1|f=false}}
1 | 1 |
Tests that should yield 4∶3
edit{{Resratio}}
{{Resratio|~4:3}}
~4:3 | ~4:3 |
{{Resratio}}
{{Resratio|-4:3}}
-4:3 | -4:3 |
{{Resratio}}
{{Resratio|4:3}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|8:6}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|12:9}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|16:12}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|4|3}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|12|9}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|16|12}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|20|15}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|1.33}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|1.333}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|1.334}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|x=4 |y=3}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|4|y=3}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|x=4 |y=3}}
4∶3 | 4∶3 |
Tests that should not yield 4∶3
edit{{Resratio}}
{{Resratio|1.3}}
1.3 | 1.3 |
{{Resratio}}
{{Resratio|1.332}}
1.332 | 1.332 |
{{Resratio}}
{{Resratio|1.3330}}
4∶3 | 4∶3 |
{{Resratio}}
{{Resratio|1.34}}
1.34 | 1.34 |
{{Resratio}}
{{Resratio|1.4}}
7∶5 | 7∶5 |
{{Resratio}}
{{Resratio|x=3 |y=4}}
3∶4 | 3∶4 |
{{Resratio}}
{{Resratio|x=3 |y=4}}
3∶4 | 3∶4 |
{{Resratio}}
{{Resratio|3|x=4}}
4∶1 | 4∶1 |
{{Resratio}}
{{Resratio|4|x=3}}
3∶1 | 3∶1 |