|
|
constexpr | basic_degree ()=default |
| | Constructs a degree value initialized to zero.
|
| |
template<scalar Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr | basic_degree (const Other value) noexcept |
| | Constructs a degree value from a scalar. More...
|
| |
template<floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr | basic_degree (const basic_degree< Other > &other) noexcept |
| | Constructs a degree value from another degree type. More...
|
| |
|
constexpr | ~basic_degree () noexcept=default |
| | Destructor.
|
| |
template<floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | operator= (const basic_degree< Other > &other) noexcept -> basic_degree< Type > & |
| | Assigns from another degree type. More...
|
| |
template<floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | operator+= (const basic_degree< Other > &rhs) noexcept -> basic_degree< Type > & |
| | Adds another degree value to this value. More...
|
| |
template<floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | operator-= (const basic_degree< Other > &rhs) noexcept -> basic_degree< Type > & |
| | Subtracts another degree value from this value. More...
|
| |
template<floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | operator*= (const Other rhs) noexcept -> basic_degree< Type > & |
| | Scales this degree value by a floating point factor. More...
|
| |
template<floating_point Other>
requires (std::is_convertible_v<Other, Type>) |
| constexpr auto | operator/= (const Other rhs) noexcept -> basic_degree< Type > & |
| | Divides this degree value by a floating point factor. More...
|
| |
| constexpr auto | value () const noexcept -> value_type |
| | Returns the stored degree value. More...
|
| |
| constexpr | operator value_type () const noexcept |
| | Implicit conversion to the underlying scalar value. More...
|
| |
| constexpr auto | data () noexcept -> value_type * |
| | Returns a pointer to the underlying stored value. More...
|
| |
template<floating_point Type>
class sbx::math::basic_degree< Type >
Strongly-typed degree value wrapper.
This type represents an angle measured in degrees. It is a thin wrapper around a floating point storage type, enabling explicit unit usage and overload selection.
- Template Parameters
-
| Type | Floating-point storage type. |