Template:Ft to m/doc

From MidsouthMakers - Memphis Area Hackerpace
Revision as of 06:06, 23 February 2010 by Dan9186 (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This template is intended to perform foot-to-meter conversions. It converts single values, ranges, as well as two- and three-dimensional measurements.

Accepted parameters

Italicized parameters are optional:

  • num, or l (length), or from, or first unnamed parameter is a required parameter, which specifies the number of feet to be converted to meters (for single value conversions), or length (for two- and three-dimensional conversions), or start of range (for range conversions). Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • w (width), or to, or second unnamed parameter is a parameter specifying width (for dimensional conversions) or end of range (for range conversions) in feet to be converted to meters. Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • h (height) or third unnamed parameter is a parameter specifying height (for three-dimensional conversions) in feet to be converted to meters. Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • convtype (conversion type) can take values of either range or dim. Range is only meaningful when two values are supplied for conversion. The default value is dim.
  • abbr can take values of either mos, yes, or no. Mos will show the names of the units as specified in the Manual of Style for dates and numbers (feet, m); yes will show the abbreviated names of the units (ft, m); and no will show the full names of the units (feet, meters). With dimensional conversions, all values will be separated with the "by" preposition when the parameter is set to no, and with the "×" sign when the parameter is set to yes. When the parameter is set to mos, feet values will be separated with the "by" preposition, and the converted values in meters—with the "×" sign. The default value is mos.
  • spell can take values of Commonwealth, Com, C, BrE or UK. For any of these values the spelling metre(s) will be used. The default spelling is meter(s). This is only meaningful when abbr is set to no.
  • precision is the number of decimal digits in the converted value. Defaulting to conversions to the most precise of the following.
  • conversions rounded down one decimal place as compared to the input value
    • note: Where a range is given the most precise of the inputs is used.
    • note: One square meter is of comparable size to ten square feet.
or
  • conversions rounded to two significant figures
  • sigfig specifies the number of significant figures in the converted value.
    • This overrides precision.
    • Where the conversion is of a range it is the number of significant figures in the first value which is specified with the second being rounded to the same level of precision.
  • max precision specifies the maximum precision to round to.
  • min precision specifies the minimum precision to round to.
  • wiki specifies whether the names of the units should be wikified or not and can take values of either yes or no. The default value is no.

Capitalization of the parameters is unimportant.

Usage and examples

Single value conversion

Usage
{{ft to m | num | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{ft to m|100}} → 100 feet (30 m)
Short notation: {{ft to m|100|abbr=yes}} → 100 ft (30 m)
Full notation: {{ft to m|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 100 feet (30.48 metres)

Range conversions

Usage
{{ft to m | from | to | convtype | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{ft to m|100|200|convtype=range}} → 100–200 feet (30–61 m)
Short notation: {{ft to m|100|200|convtype=range|abbr=yes}} → 100–200 ft (30–61 m)
Full notation: {{ft to m|from=100|to=200|convtype=range|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 100–200 feet (30.48–60.96 metres)

Two-dimensional conversions

Usage
{{ft to m | l | w | convtype | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{ft to m|100|200}} → 100 feet by 200 feet (30 m × 61 m)
Short notation: {{ft to m|100|200|abbr=yes}} → 100 ft × 200 ft (30 m × 61 m)
Full notation: {{ft to m|l=100|w=200|convtype=dim|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 100 feet by 200 feet (30.48 metres by 60.96 metres)

Three-dimensional conversions

Usage
{{ft to m | l | w | h | convtype | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{ft to m|1|2|3}} → 1 foot by 2 feet by 3 feet (0.30 m × 0.61 m × 0.91 m)
Short notation: {{ft to m|1|2|3|abbr=yes}} → 1 ft × 2 ft × 3 ft (0.30 m × 0.61 m × 0.91 m)
Full notation: {{ft to m|l=1|w=2|h=3|convtype=dim|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 1 foot by 2 feet by 3 feet (0.30 metres by 0.61 metres by 0.91 metres)

See also