US system isolated from SI

This commit is contained in:
Mateusz Pusz committed 2019-12-17 12:29:19 +01:00
1 parent b3ea3cdc91
commit 80a13b1a94
16 files changed
+258 -59

No files matched your search

+11 -3
View File
@@ -150,8 +150,6 @@ struct kilo : units::prefix<kilo, prefix, "k", ratio<1'000>> {};
struct metre : named_unit<metre, "m", prefix> {};
struct centimetre : prefixed_unit<centimetre, centi, metre> {};
struct kilometre : prefixed_unit<kilometre, kilo, metre> {};
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio<9'144, 10'000>, metre> {};
struct mile : named_scaled_unit<mile, "mi", no_prefix, ratio<1'760>, yard> {};
// time
struct second : named_unit<second, "s", prefix> {};
@@ -160,7 +158,17 @@ struct hour : named_scaled_unit<hour, "h", no_prefix, ratio<3600>, second> {};
// velocity
struct metre_per_second : unit<metre_per_second> {};
struct kilometre_per_hour : deduced_unit<kilometre_per_hour, dim_velocity, kilometre, hour> {};
struct mile_per_hour : deduced_unit<mile_per_hour, dim_velocity, mile, hour> {};
}
namespace units::us {
// length
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio<9'144, 10'000>, si::metre> {};
struct mile : named_scaled_unit<mile, "mi", no_prefix, ratio<1'760>, yard> {};
// velocity
struct mile_per_hour : deduced_unit<mile_per_hour, si::dim_velocity, mile, si::hour> {};
}
```