diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-02 23:36:32 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-02 23:36:32 +0200 |
commit | e7f5a1110bfafcd605b9330f9c7d3f5147298ed3 (patch) | |
tree | 7825d5b93a1d7c8d1b9eba871bf4513fcc0e88cf /c++/lbm_unit.hpp | |
parent | 98c91326f5952e951247b42299a2a56515603025 (diff) |
Reworking the current structure
Diffstat (limited to 'c++/lbm_unit.hpp')
-rw-r--r-- | c++/lbm_unit.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/c++/lbm_unit.hpp b/c++/lbm_unit.hpp new file mode 100644 index 0000000..c4d09f6 --- /dev/null +++ b/c++/lbm_unit.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include <kel/unit/unit.h> + +#include <string_view> + +namespace kel { +namespace lbm { +namespace lbm_type { +struct meter { + static constexpr std::string_view name = "meter_l"; + static constexpr std::string_view short_name = "m_l"; +}; + +struct second { + static constexpr std::string_view name = "second_l"; + static constexpr std::string_view short_name = "s_l"; +}; +} + +template<typename S> +using lbm_meter = unit<S, unit_component<lbm_type::meter, 1>>; + +template<typename S> +using lbm_second = unit<S, unit_component<lbm_type::second, 1>>; + +template<typename S> +using lbm_velocity = unit<S, unit_component<lbm_type::meter, 1>, unit_component<lbm_type::second, -1>>; + +template<typename S> +using lbm_acceleration = unit<S, unit_component<lbm_type::meter, 1>, unit_component<lbm_type::second, -2>>; +} +} |