|
| template<floating_point Type> |
| constexpr auto | sbx::math::operator== (const basic_degree< Type > &lhs, const basic_degree< Type > &rhs) noexcept -> bool |
| | Equality comparison for degrees. More...
|
| |
| template<floating_point Type, floating_point Other> |
| constexpr auto | sbx::math::operator<=> (const basic_degree< Type > &lhs, const basic_degree< Other > &rhs) noexcept -> std::partial_ordering |
| | Partial ordering comparison for degrees. More...
|
| |
template<floating_point Type, floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | sbx::math::operator+ (basic_degree< Type > lhs, const basic_degree< Other > &rhs) noexcept -> basic_degree< Type > |
| | Adds two degree values. More...
|
| |
template<floating_point Type, floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | sbx::math::operator- (basic_degree< Type > lhs, const basic_degree< Other > &rhs) noexcept -> basic_degree< Type > |
| | Subtracts two degree values. More...
|
| |
| template<floating_point Type, std::convertible_to< Type > Other> |
| constexpr auto | sbx::math::operator* (basic_degree< Type > lhs, const Other rhs) noexcept -> basic_degree< Type > |
| | Multiplies a degree value by a scalar factor. More...
|
| |
| template<floating_point Type, std::convertible_to< Type > Other> |
| constexpr auto | sbx::math::operator/ (basic_degree< Type > lhs, const Other rhs) noexcept -> basic_degree< Type > |
| | Divides a degree value by a scalar factor. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::clamp (const basic_degree< Type > &value, const basic_degree< Type > &min, const basic_degree< Type > &max) -> const basic_degree< Type > & |
| | Clamps a degree value to a closed interval. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::mix (const basic_degree< Type > x, const basic_degree< Type > y, const Type a) -> basic_degree< Type > |
| | Linearly interpolates between two degree values. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::operator== (const basic_radian< Type > &lhs, const basic_radian< Type > &rhs) noexcept -> bool |
| | Equality comparison for radians. More...
|
| |
| template<floating_point Type, floating_point Other> |
| constexpr auto | sbx::math::operator<=> (const basic_radian< Type > &lhs, const basic_radian< Other > &rhs) noexcept -> std::partial_ordering |
| | Partial ordering comparison for radians. More...
|
| |
template<floating_point Type, floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | sbx::math::operator+ (basic_radian< Type > lhs, const basic_radian< Other > &rhs) noexcept -> basic_radian< Type > |
| | Adds two radian values. More...
|
| |
template<floating_point Type, floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | sbx::math::operator- (basic_radian< Type > lhs, const basic_radian< Other > &rhs) noexcept -> basic_radian< Type > |
| | Subtracts two radian values. More...
|
| |
template<floating_point Type, std::convertible_to< Type > Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | sbx::math::operator* (basic_radian< Type > lhs, const Other rhs) noexcept -> basic_radian< Type > |
| | Multiplies a radian value by a scalar factor. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::clamp (const basic_radian< Type > &value, const basic_radian< Type > &min, const basic_radian< Type > &max) -> const basic_radian< Type > & |
| | Clamps a radian value to a closed interval. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::operator== (const basic_angle< Type > &lhs, const basic_angle< Type > &rhs) noexcept -> bool |
| | Equality comparison for angles. More...
|
| |
| template<floating_point Type, floating_point Other> |
| constexpr auto | sbx::math::operator<=> (const basic_angle< Type > &lhs, const basic_angle< Other > &rhs) noexcept -> std::partial_ordering |
| | Partial ordering comparison for angles. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator+ (basic_angle< LhsType > lhs, const basic_angle< RhsType > &rhs) noexcept -> basic_angle< LhsType > |
| | Adds two angles. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator+ (basic_angle< LhsType > lhs, const basic_degree< RhsType > &rhs) noexcept -> basic_angle< LhsType > |
| | Adds an angle and a degree value. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator+ (basic_angle< LhsType > lhs, const basic_radian< RhsType > &rhs) noexcept -> basic_angle< LhsType > |
| | Adds an angle and a radian value. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator- (basic_angle< LhsType > lhs, const basic_angle< RhsType > &rhs) noexcept -> basic_angle< LhsType > |
| | Subtracts two angles. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator- (basic_angle< LhsType > lhs, const basic_degree< RhsType > &rhs) noexcept -> basic_angle< LhsType > |
| | Subtracts a degree value from an angle. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator- (basic_angle< LhsType > lhs, const basic_radian< RhsType > &rhs) noexcept -> basic_angle< LhsType > |
| | Subtracts a radian value from an angle. More...
|
| |
template<floating_point LhsType, floating_point RhsType>
requires (std::is_convertible_v<RhsType, LhsType>) |
| constexpr auto | sbx::math::operator* (basic_angle< LhsType > lhs, const RhsType rhs) noexcept -> basic_angle< LhsType > |
| | Scales an angle by a scalar factor. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::clamp (const basic_angle< Type > &value, const basic_angle< Type > &min, const basic_angle< Type > &max) -> const basic_angle< Type > & |
| | Clamps an angle value to a closed interval. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::to_degrees (const basic_radian< Type > &radian) noexcept -> basic_degree< Type > |
| | Converts radians to degrees. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::to_radians (const basic_degree< Type > °ree) noexcept -> basic_radian< Type > |
| | Converts degrees to radians. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::sin (const basic_angle< Type > &angle) noexcept -> Type |
| | Computes the sine of an angle. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::sin (const basic_degree< Type > °ree) noexcept -> Type |
| | Computes the sine of a degree value. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::sin (const basic_radian< Type > &radian) noexcept -> Type |
| | Computes the sine of a radian value. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::cos (const basic_angle< Type > &angle) noexcept -> Type |
| | Computes the cosine of an angle. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::cos (const basic_degree< Type > °ree) noexcept -> Type |
| | Computes the cosine of a degree value. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::cos (const basic_radian< Type > &radian) noexcept -> Type |
| | Computes the cosine of a radian value. More...
|
| |
| template<floating_point Type> |
| constexpr auto | sbx::math::tan (const basic_angle< Type > &angle) noexcept -> Type |
| | Computes the tangent of an angle. More...
|
| |
| constexpr auto | sbx::math::literals::operator""_deg (long double value) noexcept -> degree |
| | Creates a degree value from a long double literal. More...
|
| |
| constexpr auto | sbx::math::literals::operator""_deg (unsigned long long value) noexcept -> degree |
| | Creates a degree value from an unsigned integer literal. More...
|
| |
| constexpr auto | sbx::math::literals::operator""_rad (long double value) noexcept -> radian |
| | Creates a radian value from a long double literal. More...
|
| |
| constexpr auto | sbx::math::literals::operator""_rad (unsigned long long value) noexcept -> radian |
| | Creates a radian value from an unsigned integer literal. More...
|
| |
Angle types and utilities.
This header defines strongly-typed wrappers for angular quantities in degrees and radians, plus a unified angle type that stores angles internally in radians.
The provided types are lightweight value wrappers intended to prevent unit-mismatch bugs, while remaining usable in constexpr contexts where possible.
- Author
- KAJ
- Copyright
- (C) 2026 Jonas Kabelitz