mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 04:44:27 +02:00
refactor: ice_point
and zeroth_degree_Fahrenheit
now use absolute
reference specifier
This commit is contained in:
@@ -77,7 +77,7 @@ inline constexpr struct weber final : named_unit<"Wb", volt * second> {} weber;
|
|||||||
inline constexpr struct tesla final : named_unit<"T", weber / square(metre)> {} tesla;
|
inline constexpr struct tesla final : named_unit<"T", weber / square(metre)> {} tesla;
|
||||||
inline constexpr struct henry final : named_unit<"H", weber / ampere> {} henry;
|
inline constexpr struct henry final : named_unit<"H", weber / ampere> {} henry;
|
||||||
|
|
||||||
inline constexpr struct ice_point final : relative_point_origin<quantity_point{273'150 * delta(milli<kelvin>)}> {} ice_point;
|
inline constexpr struct ice_point final : relative_point_origin<273'150 * absolute(milli<kelvin>)> {} ice_point;
|
||||||
inline constexpr auto zeroth_degree_Celsius = ice_point;
|
inline constexpr auto zeroth_degree_Celsius = ice_point;
|
||||||
inline constexpr struct degree_Celsius final : named_unit<symbol_text{u8"°C", "`C"}, kelvin, zeroth_degree_Celsius> {} degree_Celsius;
|
inline constexpr struct degree_Celsius final : named_unit<symbol_text{u8"°C", "`C"}, kelvin, zeroth_degree_Celsius> {} degree_Celsius;
|
||||||
|
|
||||||
|
@@ -118,7 +118,7 @@ inline constexpr struct troy_pound final : named_unit<"lb t", mag<12> * troy_onc
|
|||||||
inline constexpr struct inch_of_mercury final : named_unit<"inHg", mag_ratio<3'386'389, 1'000> * si::pascal> {} inch_of_mercury;
|
inline constexpr struct inch_of_mercury final : named_unit<"inHg", mag_ratio<3'386'389, 1'000> * si::pascal> {} inch_of_mercury;
|
||||||
|
|
||||||
// https://en.wikipedia.org/wiki/United_States_customary_units#Temperature
|
// https://en.wikipedia.org/wiki/United_States_customary_units#Temperature
|
||||||
inline constexpr struct zeroth_degree_Fahrenheit final : relative_point_origin<quantity_point{-32 * delta(mag_ratio<5, 9> * si::degree_Celsius)}> {} zeroth_degree_Fahrenheit;
|
inline constexpr struct zeroth_degree_Fahrenheit final : relative_point_origin<-32 * absolute(mag_ratio<5, 9> * si::degree_Celsius)> {} zeroth_degree_Fahrenheit;
|
||||||
inline constexpr struct degree_Fahrenheit final : named_unit<symbol_text{u8"°F", "`F"}, mag_ratio<5, 9> * si::degree_Celsius, zeroth_degree_Fahrenheit> {} degree_Fahrenheit;
|
inline constexpr struct degree_Fahrenheit final : named_unit<symbol_text{u8"°F", "`F"}, mag_ratio<5, 9> * si::degree_Celsius, zeroth_degree_Fahrenheit> {} degree_Fahrenheit;
|
||||||
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
Reference in New Issue
Block a user