|
|
constexpr | sign () noexcept=default |
| | Default constructor (constructs a positive sign).
|
| |
|
constexpr | sign (bool pos) noexcept |
| | Construction with explicit specitication of the sign.
|
| |
|
template<typename X , typename = std::enable_if_t<!std::is_same_v<X, sign<T>>>> |
| constexpr | sign (const X &value) noexcept |
| | Construction taking the sign from the specified numeric value.
|
| |
|
template<typename X , typename = std::enable_if_t<!std::is_same_v<X, sign<T>>>> |
| auto | operator= (const X &value) noexcept -> auto & |
| | Assignment taking the sign from the specified numeric value.
|
| |
|
| operator T () const noexcept |
| | Returns either 1 if this sign is positive or -1 if negative.
|
| |
| auto | flip () noexcept -> auto & |
| | Flip this sign from positive to negative or vice-versa. More...
|
| |
| auto | flipped () const noexcept -> sign |
| | Returns a new sign opposite to this sign. More...
|
| |
| auto | operator- () const noexcept -> sign |
| | Returns a new sign opposite to this sign. More...
|
| |
| auto | operator! () const noexcept -> sign |
| | Returns a new sign opposite to this sign. More...
|
| |
template<typename T>
class eagine::math::sign< T >
Class representing a positive or negative numeric sign.
Instances of this class can be multiplied to values of type T.