Template:Volume/doc

This template calculates the volume of a three-dimensional space. This is for cubic feet, cubic centimeters, etc., not for converting linear measures to things like gallons.

It only accepts numeric input, not units, and does not perform conversions.

By default, it simply outputs the calculated volume, rounded to two decimal places (if rounding can be applied). Rounding value can be changed.

It can also be told to output table cells showing all three of the dimensional measures followed by the volume.

Usage
produces:

produces:

produces:

produces:

Parameters

 * x or first unnamed parameter – First measure (e.g. length). Must be numerals (e.g. 12) or a number in decimal format (e.g. 47.93). or any other data.
 * y or second unnamed parameter – Second measure (e.g. width). Same format as above.
 * z or third unnamed parameter – Third measure (e.g. height/depth). Same format as above.
 * n – Specify a different rounding from the default, which is  (rounded to two decimal places, if rounding applies). Must be a numeral.
 * yes (or any other value such as y or true – Cause the template to output an inline row of table cells in the format:

(this does not include a  line to create the table row, only the line of cells).

This template does not currently support any units or conversion. This could be changed.

Use cases

 * Inline: " "
 * Another option (so you needn't do any manual conversion) is to add the first part (the feet measure in the example), do a page preview and note what the calculation is ( in this case), then feed that to : "... "
 * The two methods above can produce mismatched approximations. The first applied your own two-decimal rounding to each ft to m conversion, then multiplied these together, producing a result of 15.34. The latter method took unrounded values that were calculated from feet to meters, multiplied them, then rounded the result, producing output of 15.29 . The latter method is more accurate when starting with only one set of sourced measurements. The former method may be preferable when the source provides both sets of dimensional measures, since the editor cannot be certain in which unit the measure was more accurately performed (i.e., which was converted and approximated from which), unless the source explicitly specifies this.
 * Table: Create a table the headers of which specify what the units are, then a table row, then this template, with y, as the content of the table row (the template creates cells, it doesn't go in one). If a conversion is required, it could be provided in an additional cell, in a column for that unit, e.g. with: