|
CeresEngine 0.2.0
A game development framework
|
A wide integer type that uses Hi for the high-order bits in the integer data and Lo for the low-order bits.
More...
#include <CeresEngine/Math/LargeInteger.hpp>
Public Types | |
| using | Self = LargeInteger< Hi, Low > |
| The large integer type itself. | |
Public Member Functions | |
| constexpr | LargeInteger () noexcept=default |
Creates a new LargeInteger initialized to the value of 0. | |
| constexpr | LargeInteger (const LargeInteger &) noexcept=default |
Creates a new LargeInteger by copying the contents of another. | |
| LargeInteger & | operator= (const LargeInteger &) noexcept=default |
Assigns the LargeInteger by copying the contents of another. | |
| constexpr | LargeInteger (LargeInteger &&) noexcept=default |
Creates a new LargeInteger by moving the contents of another. | |
| LargeInteger & | operator= (LargeInteger &&) noexcept=default |
Assigns the LargeInteger by moving the contents of another. | |
| template<typename THi > | |
| constexpr | LargeInteger (LargeInteger< THi, Low > value) noexcept |
Creates a new LargeInteger by converting the Hi representation type. | |
| template<typename Tp , typename = std::enable_if_t<std::is_integral_v<Tp>>> | |
| constexpr | LargeInteger (Tp value) noexcept |
Creates a new LargeInteger by converting from the native integer value. | |
| template<typename Tp , typename = std::enable_if_t<std::is_integral_v<Tp>>> | |
| constexpr | operator Tp () const noexcept |
Converts the LargeInteger into a native integer format. | |
| constexpr | LargeInteger (float value) noexcept |
Creates a new LargeInteger by converting from the floating point value. | |
| constexpr | operator float () const noexcept |
Converts the LargeInteger into a floating point value. | |
| constexpr | LargeInteger (double value) noexcept |
Creates a new LargeInteger by converting from the floating point value. | |
| constexpr | operator double () const noexcept |
Converts the LargeInteger into a floating point value. | |
| constexpr | LargeInteger (long double value) noexcept |
Creates a new LargeInteger by converting from the floating point value. | |
| constexpr | operator long double () const noexcept |
Converts the LargeInteger into a floating point value. | |
| constexpr | operator bool () const noexcept |
A overloaded bool operator that checks if any of the bits in the large integer are set to non-zero. | |
Friends | |
| template<typename , typename > | |
| struct | LargeInteger |
A wide integer type that uses Hi for the high-order bits in the integer data and Lo for the low-order bits.
| Hi | the large integer higher-order bits type |
| Low | the large integer lower-order bits type. By default, this is set to the unsigned form of Hi by using the helper class std::make_unsigned<Hi>. |
| using Math::LargeInteger< Hi, Low >::Self = LargeInteger<Hi, Low> |
The large integer type itself.
Used to avoid automatic template deduction on operator arguments.
|
constexprdefaultnoexcept |
Creates a new LargeInteger initialized to the value of 0.
|
constexprdefaultnoexcept |
Creates a new LargeInteger by copying the contents of another.
|
constexprdefaultnoexcept |
Creates a new LargeInteger by moving the contents of another.
|
inlineexplicitconstexprnoexcept |
Creates a new LargeInteger by converting the Hi representation type.
| THi | the old Hi type to convert from |
| value | The large integer value |
|
inlineconstexprnoexcept |
Creates a new LargeInteger by converting from the native integer value.
| value | The native integer to convert from |
|
inlineconstexprnoexcept |
Creates a new LargeInteger by converting from the floating point value.
| value | The floating point value to convert from |
|
inlineconstexprnoexcept |
Creates a new LargeInteger by converting from the floating point value.
| value | The floating point value to convert from |
|
inlineconstexprnoexcept |
Creates a new LargeInteger by converting from the floating point value.
| value | The floating point value to convert from |
|
inlineexplicitconstexprnoexcept |
A overloaded bool operator that checks if any of the bits in the large integer are set to non-zero.
true if the integer is different than 0.
|
inlineexplicitconstexprnoexcept |
Converts the LargeInteger into a floating point value.
|
inlineexplicitconstexprnoexcept |
Converts the LargeInteger into a floating point value.
|
inlineexplicitconstexprnoexcept |
Converts the LargeInteger into a floating point value.
|
inlineexplicitconstexprnoexcept |
Converts the LargeInteger into a native integer format.
Any higher-order bits that cannot fit in the requested type are discarded.
|
defaultnoexcept |
Assigns the LargeInteger by copying the contents of another.
*this
|
defaultnoexcept |
Assigns the LargeInteger by moving the contents of another.
*this
|
friend |