Creative
 

Template:Convert

From Basilicus

This template uses the following subtemplates:

[edit] Usage

This template converts between units, including both Basilicus units and Earth units. It converts a single value in units of length, mass, temperature or time into another unit of the same type.

[edit] Syntax

{{Convert|amount|unit1|unit2}}

{{Convert|amount|unit1}}

amount: The value to convert

unit1: The units the amount is currently in

unit2: The units to convert the value to (optional) If this is not specified, the value will be converted to the closest unit in the Basilicus Weights and Measures.

[edit] Examples

  • If the units can be converted directly across:

{{Convert|5|meters|holds}} produces 6.5359477124183E-17

  • If there is no conversion between the units:

{{Convert|5|meters|grams}} produces Error: Types not compatible

  • If both units are not recognized:

{{Convert|5|pizzas|dollars}} produces Error: Type not recognized

  • Abbreviations are recognized:

{{Convert|5|m|km}} produces 0.005

  • If the second parameter is not specified:

{{Convert|523|grams}} produces 0.24034926470588 SMU