mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 20:04:27 +02:00
feat: unit symbols added for CGS
This commit is contained in:
@@ -29,8 +29,8 @@ namespace units::si::cgs {
|
||||
|
||||
// clang-format off
|
||||
inline constexpr struct centimetre : si::centi_<si::metre> {} centimetre;
|
||||
inline constexpr struct gram : si::gram {} gram;
|
||||
inline constexpr struct second : si::second {} second;
|
||||
inline constexpr struct gram : decltype(si::gram) {} gram;
|
||||
inline constexpr struct second : decltype(si::second) {} second;
|
||||
inline constexpr struct gal : named_unit<"Gal", centimetre / square<second>> {} gal;
|
||||
inline constexpr struct dyne : named_unit<"dyn", gram * centimetre / square<second>> {} dyne;
|
||||
inline constexpr struct erg : named_unit<"erg", dyne / centimetre> {} erg;
|
||||
@@ -40,4 +40,17 @@ inline constexpr struct stokes : named_unit<"St", square<centimetre> / second> {
|
||||
inline constexpr struct kayser : decltype(1 / centimetre) {} kayser;
|
||||
// clang-format on
|
||||
|
||||
namespace unit_symbols {
|
||||
|
||||
inline constexpr auto cm = centimetre;
|
||||
inline constexpr auto g = gram;
|
||||
inline constexpr auto s = second;
|
||||
inline constexpr auto Gal = gal;
|
||||
inline constexpr auto dyn = dyne;
|
||||
inline constexpr auto Ba = barye;
|
||||
inline constexpr auto P = poise;
|
||||
inline constexpr auto St = stokes;
|
||||
|
||||
} // namespace unit_symbols
|
||||
|
||||
} // namespace units::si::cgs
|
||||
|
Reference in New Issue
Block a user