Template:Convert/scale

0

The Template:Convert/scale allows a custom scale formula to be used to convert a unit into another unit. The general conversion formula is: y = a&middot;x + b   or   y = a&middot;(x+offset) + b.


 * Usage: {&#123;convert/scale|3.5|ins|outs|a=2|b=1}} &rarr;
 * {&#123;convert/scale|10.0|www|zzz|a=6.70|b=0.5}} &rarr;
 * &rarr;

The formula has x as the number from parameter 1, where the scale factor is a (default a=2.0), the original offset amount is parameter offset=0.0, and the final shift is parameter b=0.0 (or add=0.0).

The parameters are:
 * - the amount to convert (can have a fraction: 2+3/4)
 * - the literal input unit name or symbol
 * - the literal output unit name or symbol
 * a (or f) - the scale factor (default: a=2.0)
 * offset  - the initial offset amount (default: offset=0.0)
 * b (or add) - the final shift amount (default: add=0.0)
 * r    - the rounding amount (default: same precision as {1} )
 * sep    - separator text between input unit & output amount (default: "" parentheses)

The basic formula is a linear conversion, scaling the amount from parameter 1.