[READ-ONLY] Mirror of https://github.com/probablykasper/cpc. Text calculator with support for units and conversion cpc.kasper.space
calculator cli conversion converter library math package units units-converter wasm website
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix btu/h, btu/s units

Kasper (Jun 20, 2026, 2:24 AM +0200) c1c19afc b72bdba6

+7 -8
+7 -8
src/units.rs
··· 291 291 Gigawatt: (Power, d!(1000000000), "gigawatt", "gigawatts"), 292 292 Terawatt: (Power, d!(1000000000000), "terawatt", "terawatts"), 293 293 Petawatt: (Power, d!(1000000000000000), "petawatt", "petawatts"), 294 - // probably inexact: 295 - BritishThermalUnitsPerMinute: (Power, d!(3.412141633128), "british thermal unit per minute", "british thermal units per minute"), 296 - // probably inexact: 297 - BritishThermalUnitsPerHour: (Power, d!(0.0568690272188), "british thermal unit per hour", "british thermal units per hour"), 298 - // exact according to wikipedia: 294 + // inexact: 295 + BritishThermalUnitsPerMinute: (Power, d!(17.584264210333), "british thermal unit per minute", "british thermal units per minute"), 296 + // inexact: 297 + BritishThermalUnitsPerHour: (Power, d!(0.29307107017222), "british thermal unit per hour", "british thermal units per hour"), // exact according to wikipedia: 299 298 Horsepower: (Power, d!(745.69987158227022), "horsepower", "horsepower"), 300 299 MetricHorsepower: (Power, d!(735.49875), "metric horsepower", "metric horsepower"), 301 300 ··· 1058 1057 assert_float_eq!(convert_test(1000.0, Megawatt, Gigawatt), 1.0); 1059 1058 assert_float_eq!(convert_test(1000.0, Gigawatt, Terawatt), 1.0); 1060 1059 assert_float_eq!(convert_test(1000.0, Terawatt, Petawatt), 1.0); 1061 - // assert_float_eq!(convert_test(0.0568690272188, Watt, BritishThermalUnitsPerMinute), 1.0); 1062 - // assert_float_eq!(convert_test(60.0, BritishThermalUnitsPerMinute, BritishThermalUnitsPerHour), 1.0); 1060 + assert_float_eq!(convert_test(17.584264210333, Watt, BritishThermalUnitsPerMinute), 1.0); 1061 + assert_float_eq!(convert_test(59.999999999999317571673374406441452784, BritishThermalUnitsPerHour, BritishThermalUnitsPerMinute), 1.0); 1063 1062 assert_float_eq!(convert_test(745.6998715822702, Watt, Horsepower), 1.0); 1064 1063 assert_float_eq!(convert_test(735.49875, Watt, MetricHorsepower), 1.0); 1065 1064 ··· 1079 1078 assert_float_eq!(convert_test(1000.0, Millibar, Bar), 1.0); 1080 1079 assert_float_eq!(convert_test(3386.389, Pascal, InchOfMercury), 1.0); 1081 1080 assert_float_eq!(convert_test(6894.757293168361, Pascal, PoundsPerSquareInch), 1.0); 1082 - // assert_float_eq!(convert_test(162.12, Pascal, Torr), 1.0); 1081 + assert_float_eq!(convert_test(133.3223684210526, Pascal, Torr), 1.0); 1083 1082 1084 1083 assert_float_eq!(convert_test(1000.0, Hertz, Kilohertz), 1.0); 1085 1084 assert_float_eq!(convert_test(1000.0, Kilohertz, Megahertz), 1.0);