|
qtty-cpp 0.4.5
Header-only C++ wrapper for qtty
|
Angle wrapping and separation helpers, mirroring the angular methods on the Rust Quantity<U: AngularUnit> (qtty_core::angular).
More...


Go to the source code of this file.
Classes | |
| struct | qtty::AngularTraits< Tag > |
Namespaces | |
| namespace | qtty |
| namespace | qtty::detail |
Macros | |
| #define | QTTY_MARK_ANGULAR(Tag) |
Functions | |
| qtty::QTTY_MARK_ANGULAR (MilliradianTag) | |
| qtty::QTTY_MARK_ANGULAR (RadianTag) | |
| qtty::QTTY_MARK_ANGULAR (MicroArcsecondTag) | |
| qtty::QTTY_MARK_ANGULAR (MilliArcsecondTag) | |
| qtty::QTTY_MARK_ANGULAR (ArcsecondTag) | |
| qtty::QTTY_MARK_ANGULAR (ArcminuteTag) | |
| qtty::QTTY_MARK_ANGULAR (DegreeTag) | |
| qtty::QTTY_MARK_ANGULAR (GradianTag) | |
| qtty::QTTY_MARK_ANGULAR (TurnTag) | |
| qtty::QTTY_MARK_ANGULAR (HourAngleTag) | |
| template<class Tag > | |
| auto | qtty::sin (Quantity< Tag > a) |
| template<class Tag > | |
| auto | qtty::cos (Quantity< Tag > a) |
| template<class Tag > | |
| auto | qtty::tan (Quantity< Tag > a) |
| double | qtty::detail::rem_euclid (double a, double b) |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| double | qtty::angular_full_turn () |
Magnitude of one full revolution expressed in the angular unit Tag. | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::wrap_pos (Quantity< Tag > a) |
Wrap into the canonical positive range [0, FULL_TURN). | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::normalize (Quantity< Tag > a) |
Alias of wrap_pos: normalize into [0, FULL_TURN). | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::wrap_signed (Quantity< Tag > a) |
Wrap into the signed range (-HALF_TURN, HALF_TURN]. | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::wrap_signed_lo (Quantity< Tag > a) |
Wrap into the alternate signed range [-HALF_TURN, HALF_TURN). | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::wrap_quarter_fold (Quantity< Tag > a) |
"Latitude fold": map into [-QUARTER_TURN, +QUARTER_TURN]. | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::signed_separation (Quantity< Tag > a, Quantity< Tag > b) |
Signed smallest angular separation in (-HALF_TURN, HALF_TURN]. | |
| template<class Tag , class = std::enable_if_t<is_angular_v<Tag>>> | |
| Quantity< Tag > | qtty::abs_separation (Quantity< Tag > a, Quantity< Tag > b) |
| Absolute smallest angular separation (magnitude only). | |
Variables | |
| template<class Tag > | |
| constexpr bool | qtty::is_angular_v = AngularTraits<Tag>::is_angular |
Angle wrapping and separation helpers, mirroring the angular methods on the Rust Quantity<U: AngularUnit> (qtty_core::angular).
These are provided as free functions templated on the angular unit tag, and are SFINAE-constrained to the angular units only. The full-turn magnitude in the target unit is obtained through the FFI conversion of 2π radians, so the helpers are exact in every supported angular unit.
Definition in file angles.hpp.
| #define QTTY_MARK_ANGULAR | ( | Tag | ) |
Definition at line 31 of file angles.hpp.