Template talk:T&Fcalc
Appearance
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
Rounding down
[edit]Is there a reason the template rounds down to the nearest quarter inch? For example, 1.2 metres is ~3 ft 11.244094488189 in; the template rounds this down to 3 ft 11 in instead of up to 3 ft 11+1⁄4 in. If there is no reason for this, {{convert| |m|ftin|frac=4}}
could be used instead. Jimp 10:20, 8 November 2015 (UTC)
- The template properly follows the rounding rules of Track and Field, not mathematics in general, that is why it is a sport specific calculator. Trackinfo (talk) 18:52, 8 November 2015 (UTC)
0+1⁄4
[edit]The template gives "0+1⁄4 in", "0+1⁄2 in" and "0+3⁄4 in", e.g.
{{T&Fcalc|1.231}}
→ 1.231 m (4 ft 1⁄4 in){{T&Fcalc|1.236}}
→ 1.236 m (4 ft 1⁄2 in){{T&Fcalc|1.241}}
→ 1.241 m (4 ft 3⁄4 in)
Why the zeros? Jimp 10:20, 8 November 2015 (UTC)
- @Jimp: This is due to the template largely being a mathematical function. It's possible to remove the zero when there is only a fraction of inches, but it's basically going to double the complexity of the code. You'd need to handle for different outcomes when there are (a) full inches and fractions, (b) fractions but no full inches, (c) full inches and no fractions, and (d) no full inches or fractions).
- There also the question of whether it would be non-standard to exclude the zero, as typically in track results the zeros are stated to indicate the precision (as opposed to less precisely measured marks). See the USATF converter for example. SFB 18:44, 8 November 2015 (UTC)
- I didn't see this thread before I refactored it to use {{convert}} for the ft and in. if you feel strongly about the 0, then please feel free to change it back. Frietjes (talk) 15:26, 23 October 2018 (UTC)