Use mag_power to make callsites more concise

This commit is contained in:
Chip Hogg committed 2022-07-27 14:30:38 +00:00
1 parent 7e591115fa
commit 0adee83866
9 files changed
+27 -22

No files matched your search

@@ -58,8 +58,7 @@ struct exakatal : prefixed_unit<exakatal, exa, katal> {};
struct zettakatal : prefixed_unit<zettakatal, zetta, katal> {};
struct yottakatal : prefixed_unit<yottakatal, yotta, katal> {};
struct enzyme_unit :
named_scaled_unit<enzyme_unit, "U", as_magnitude<ratio(1, 60)>() * pow<-6>(as_magnitude<10>()), katal> {};
struct enzyme_unit : named_scaled_unit<enzyme_unit, "U", as_magnitude<ratio(1, 60)>() * mag_power<10, -6>(), katal> {};
struct dim_catalytic_activity :
isq::dim_catalytic_activity<dim_catalytic_activity, katal, dim_time, dim_amount_of_substance> {};
+2 -2
View File
@@ -56,8 +56,8 @@ struct yottajoule : prefixed_unit<yottajoule, yotta, joule> {};
// N.B. electron charge (and eV) is an exact constant:
// https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf#page=147
struct electronvolt :
named_scaled_unit<electronvolt, "eV",
as_magnitude<ratio(1'602'176'634, 1'000'000'000)>() * pow<-19>(as_magnitude<10>()), joule> {};
named_scaled_unit<electronvolt, "eV", as_magnitude<ratio(1'602'176'634, 1'000'000'000)>() * mag_power<10, -19>(),
joule> {};
struct gigaelectronvolt : prefixed_unit<gigaelectronvolt, giga, electronvolt> {};
struct dim_energy : isq::dim_energy<dim_energy, joule, dim_force, dim_length> {};
+2 -2
View File
@@ -80,8 +80,8 @@ struct yottatonne : prefixed_unit<yottatonne, yotta, tonne> {};
struct dalton :
named_scaled_unit<dalton, "Da",
as_magnitude<ratio(16'605'390'666'050, 10'000'000'000'000)>() * pow<-27>(as_magnitude<10>()),
kilogram> {};
as_magnitude<ratio(16'605'390'666'050, 10'000'000'000'000)>() * mag_power<10, -27>(), kilogram> {
};
struct dim_mass : isq::dim_mass<kilogram> {};