2#include <ossia/network/dataspace/dataspace_base.hpp>
3#include <ossia/network/dataspace/dataspace_base_defs_fwd.hpp>
4#include <ossia/network/domain/domain.hpp>
12using meter_per_second_u = speed_ratio<std::ratio<1>>;
13using miles_per_hour_u = speed_ratio<std::ratio<254 * 12 * 5280, 3600 * 10000>>;
14using kilometer_per_hour_u = speed_ratio<std::ratio<1000, 3600>>;
15using knot_u = speed_ratio<std::ratio<1852, 3600>>;
16using foot_per_hour_u = speed_ratio<std::ratio<254 * 12, 3600 * 10000>>;
17using foot_per_second_u = speed_ratio<std::ratio<254 * 12, 10000>>;
19template <
typename Impl>
22 using is_unit = std::true_type;
23 using neutral_unit = meter_per_second_u;
24 using value_type = float;
25 using concrete_type = Impl;
26 using dataspace_type = speed_u;
27 using is_multidimensional = std::false_type;
31struct speed_ratio :
public linear_unit<speed_unit<speed_ratio<T>>, T>
33 using linear_unit<speed_unit<speed_ratio<T>>, T>::linear_unit;
37 static constexpr auto bounding() {
return ossia::bounding_mode::FREE; }
41struct unit_traits<meter_per_second_u>
43 static constexpr auto text() { constexpr_return(ossia::make_string_array(
"m/s")); }
47struct unit_traits<miles_per_hour_u>
49 static constexpr auto text()
51 constexpr_return(ossia::make_string_array(
"mph",
"mi/h"));
56struct unit_traits<kilometer_per_hour_u>
58 static constexpr auto text()
60 constexpr_return(ossia::make_string_array(
"km/h",
"kmph"));
65struct unit_traits<knot_u>
67 static constexpr auto text() { constexpr_return(ossia::make_string_array(
"kn")); }
71struct unit_traits<foot_per_hour_u>
73 static constexpr auto text() { constexpr_return(ossia::make_string_array(
"ft/h")); }
77struct unit_traits<foot_per_second_u>
79 static constexpr auto text() { constexpr_return(ossia::make_string_array(
"ft/s")); }
domain A domain of values
Definition domain_base.hpp:23