Шаблон:Convert/Dual/LoffAoffD5Soff
The Template:Convert/Dual/LoffAoffD5Soff is a subtemplate of Template:Convert to handle ranges with 5-increment rounding and option abbr=def to show unit name then output unit symbol. The 2 output amounts, in the range, are rounded to the nearest 5 units. Any result amount less than 2.5 will round to zero.
Performance considerations
[вироиши манбаъ]This template runs essentially at the speed of 3 simple {Convert} operations, by invoking the underlying subtemplates which process the output unit, after the input unit has been decoded into conversion factor {b} passed twice, into the output-unit subtemplate for each of the 2 amounts. The 5-increment rounding, to the nearest 5 units, occurs after any optional sigfig=n rounding (or "|n" rounding from parameter 5 or 6). Hence, use of "disp=5" does not require removal of any other rounding parameters.
The resulting unit symbol is displayed using Template:Convert/LoffAonSoffu2. Overall, this subtemplate is much more complex than the typical formatter subtemplates of Template:Convert. It allows the output unit-code to be default "def". It also handles fractions in both amounts.
See also
[вироиши манбаъ]- Template:Convert/Dual/LoffAonD5Soff - format a range with "disp=flip5" & "abbr=on"
- Template:Convert/Dual/LoffAoffDflip5Soff - format a range with "disp=flip5"
- Template:Convert/LoffAoffDflip5Soff - format a 1-amount conversion with "disp=flip5"