Template:Kg to lb: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#expr:{{{1}}}*2}}</includeonly><noinclude> Convert a value in kilograms to pounds. Simply doubles the value, '''because that's what the game goes, for real!''' Example: <pre> Jaheira's weight is 75 kg ({{kg to lb|75}} lb). </pre> Result: Jaheira's weight is 75 kg ({{kg to lb|75}} lb). This is mainly for using in other templates that automatically do such conversion. It wouldn't exactly be difficult to do <code><nowiki>{{#expr: kg_value * 2}}</nowiki...")
 
(Use documentation template)
 
Line 1: Line 1:
<includeonly>{{#expr:{{{1}}}*2}}</includeonly><noinclude>
<includeonly>{{#expr:{{{1}}}*2}}</includeonly><noinclude>{{Documentation|content=
Convert a value in kilograms to pounds. Simply doubles the value, '''because that's what the game goes, for real!'''
Convert a value in kilograms to pounds. Simply doubles the value, '''because that's what the game goes, for real!'''


Example:
== Examples ==
 
{{Template demo
<pre>
| style = table
Jaheira's weight is 75 kg ({{kg to lb|75}} lb).
| <nowiki>Jaheira's weight is 75 kg ({{kg to lb|75}} lb).</nowiki>
</pre>
}}
 
Result:
 
Jaheira's weight is 75 kg ({{kg to lb|75}} lb).


This is mainly for using in other templates that automatically do such conversion.
This is mainly for using in other templates that automatically do such conversion.


It wouldn't exactly be difficult to do <code><nowiki>{{#expr: kg_value * 2}}</nowiki></code> every time manually, but then you would need to explain in a comment every time that simply doubling the value is indeed the right thing to do! Doing it centrally with a template lets us have one place to explain this weirdness and hide away the dirt.
It wouldn't exactly be difficult to do <code><nowiki>{{#expr: kg_value * 2}}</nowiki></code> every time manually, but then you would need to explain in a comment every time that simply doubling the value is indeed the right thing to do! Doing it centrally with a template lets us have one place to explain this weirdness and hide away the dirt.
}}
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 19:39, 19 January 2025

Template documentation

Convert a value in kilograms to pounds. Simply doubles the value, because that's what the game goes, for real!

Examples

Markup Renders as
Jaheira's weight is 75 kg ({{kg to lb|75}} lb).
Jaheira's weight is 75 kg (150 lb).

This is mainly for using in other templates that automatically do such conversion.

It wouldn't exactly be difficult to do {{#expr: kg_value * 2}} every time manually, but then you would need to explain in a comment every time that simply doubling the value is indeed the right thing to do! Doing it centrally with a template lets us have one place to explain this weirdness and hide away the dirt.