We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d123fc commit c708281Copy full SHA for c708281
include/units.hpp
@@ -61,6 +61,16 @@ inline constexpr double hsec2rad(double seconds) noexcept {
61
return seconds * f;
62
}
63
64
+/** @brief Convert hours (of time) to radians.
65
+ * @param[in] hours Angle in [hours] of time
66
+ * @return The (input) angle in [rad]
67
+ */
68
+inline constexpr double hours2rad(double hours) noexcept {
69
+ constexpr const double f = detail::AngleUnitTraits<
70
+ detail::AngleUnit::Hours>::to_units<detail::AngleUnit::Radians>();
71
+ return hours * f;
72
+}
73
+
74
/** Normalize angle in the range [0, 2π]/[0,360]
75
*
76
* @tparam U Units of input angle, AngleUnits::Radians, or AngleUnits::Degrees
0 commit comments