Difference between revisions of "Template:Convert"
From LFS Manual
Jump to navigationJump to searchm |
m |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{{1}}} {{# | + | <includeonly>{{{1}}} {{#switch:{{{2|}}} |
− | | km | | + | | km = km |
− | | kmh | + | | km2 = km² |
+ | | kmh = km/h | ||
+ | | kw = kW | ||
+ | | nm = Nm | ||
}} ({{#expr: | }} ({{#expr: | ||
+ | |||
{{{1}}} * | {{{1}}} * | ||
+ | |||
{{#ifeq:{{{2|}}}-{{{3|}}} | km-mi | 0.621371192 }} | {{#ifeq:{{{2|}}}-{{{3|}}} | km-mi | 0.621371192 }} | ||
+ | {{#ifeq:{{{2|}}}-{{{3|}}} | km2-mi2 | 0.621371192*0.621371192 }} | ||
{{#ifeq:{{{2|}}}-{{{3|}}} | kmh-mph | 0.621371192 }} | {{#ifeq:{{{2|}}}-{{{3|}}} | kmh-mph | 0.621371192 }} | ||
− | round {{{ | + | {{#ifeq:{{{2|}}}-{{{3|}}} | kw-bhp | 1.341 }} |
− | }} {{# | + | {{#ifeq:{{{2|}}}-{{{3|}}} | nm-lbft | 0.7376 }} |
− | | mi | | + | |
− | | mph | | + | round {{{round|0}}} |
+ | |||
+ | }} {{#switch:{{{3|}}} | ||
+ | | mi = mi | ||
+ | | mi2 = mi² | ||
+ | | mph = mph | ||
+ | | bhp = bhp | ||
+ | | lbft = lbft | ||
}})</includeonly><noinclude>{{documentation}}</noinclude> | }})</includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 14:22, 10 December 2023
Template documentation
Usage
Markup | Renders as |
---|---|
{{convert|1|km|mi|round=2}} |
1 km (0.62 mi) |
Markup | Renders as |
---|---|
{{convert|1|km2|mi2|round=2}} |
1 km² (0.39 mi²) |
Markup | Renders as |
---|---|
{{convert|1|kmh|mph|round=3}} |
1 km/h (0.62 mph) |
Markup | Renders as |
---|---|
{{convert|1|kmh|mph|round=2}} |
1 km/h (0.62 mph) |
Markup | Renders as |
---|---|
{{convert|200|kw|bhp}} |
200 kW (268 bhp) |
Markup | Renders as |
---|---|
{{convert|400|nm|lbft}} |
400 Nm (295 lbft) |