Template talk:Convert

From Halopedia, the Halo wiki

Accuracy[edit]

Don't know if it's just me that noticed this, but I've seen that the convert template is not overly accurate at times. For example 300 meters to feet is 984.252, but with the template we get 300 metres (980 ft). It's kind of minor, but is there a way to fix this? --NightHammer(talk)(contribs) 10:56, 10 December 2015 (EST)

It would appear that you would need to specify the significant figure of the conversion to get it to be more accurate. Try using |sigfig=. For example, the template with a parameter of 6 for the significant figure now gives us 300 metres (984.252 ft).— subtank 11:12, 10 December 2015 (EST)
Huh, I had figured |sigfig= was just for decimal places. Good to know, thanks! --NightHammer(talk)(contribs) 11:21, 10 December 2015 (EST)
Math, yo!subtank 11:23, 10 December 2015 (EST)
Ya, that makes sense in hindsight. --NightHammer(talk)(contribs) 11:30, 10 December 2015 (EST)

New Conversion units[edit]

The "Convert" template apparently needs an update to include other convertible units like power (hp, kW, PS, etc.) and torque (ft·lb, ft/in, N·m, etc.).

Area Unit 1 name Unit 2 name Relation between units
Power hp/bhp (mechanical horsepower) kW 1 hp = 0.74569987158227022 kW
Power hp/bhp PS (metric horsepower) 1 hp = 1.013869665424 PS
Power PS kW 1 PS = 0.73549875 kW
Torque lb·ft/ft·lb N·m 1 ft·lb = 1.3558179483314004 N·m
Torque N·m lb/in 1 N·m = 8.8507457673787 lb/in
Examples
  1. {{Convert|720|hp|kW|sigfig=3}} should result in this: 720 hp (537 kW).
    • Using {{Convert|720|bhp|kW|sigfig=3}} should also spawn the same result. The "kW" can be written in all caps as "KW", and the resulting numbers should not be changed.
  2. {{Convert|855|ftlb|Nm}} should result in this: 855 ft·lb (1,160 N·m).
    • Using {{Convert|855|lbft|Nm}} should also spawn the same result.
  3. {{Convert|537|kW|PS}} should result in this: 537 kW (730 PS).
Why these new units should be added to the Convert template

Adding these new units to the Convert template will make life easier, especially when it comes to this page, which has all the power and torque ratings written out normally due to the Convert template not accomodating for either power nor torque.

- McLarenP1 Boy (talk) 14:48, 9 December 2018 (EST)