Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/BigInt.h |
| Include | #include "Math/BigInt.h" |
Syntax
template<int32 NumBits, bool bSigned>
class TBigInt
Remarks
N-bit integer.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TBigInt () |
Default constructor. Initializes the number to zero. | ||
| Constructor. Initializes this big int with a 64 bit integer value. | |||
| Constructor. Initializes this big int with an array of words. | |||
| Constructor. Initializes this big int with a string representing a hex value. | |||
| Constructor. Initializes this big int with an array of bytes. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Adds two integers. | ||
| void | BitwiseAnd
(
const BigInt& Other |
Bitwise 'and' | |
| void | BitwiseNot () |
Bitwise 'not' | |
| void | Bitwise 'or' | ||
| void | Divides two integers. | ||
| void | DivideWithRemainder
(
const BigInt& Divisor, |
Divides two integers with remainder. | |
| int32 | Returns a bit value as an integer value (0 or 1). | ||
| const uint32 * | GetBits () |
||
| uint32 * | GetBits () |
||
| int32 | Returns the index of the highest non-zero bit. -1 if no such bit exists. | ||
| int32 | Returns the index of the highest word that is not zero. -1 if no such word exists. | ||
| bool | Checks if two integers are equal. | ||
| bool | |||
| bool | This > Other | ||
| bool | IsGreaterOrEqual
(
const BigInt& Other |
This >= Other | |
| bool | This > 0 | ||
| bool | This < Other | ||
| bool | IsLessOrEqual
(
const BigInt& Other |
This <= Other | |
| bool | This < 0 | ||
| bool | IsNegative () |
Checks if this integer is negative. | |
| bool | IsZero () |
This == 0 | |
| void | Performs modulo operation on this integer. | ||
| void | Multiplies two integers. | ||
| void | MultiplyFast
(
const BigInt& Factor |
Multiplies two positive integers. | |
| void | Negate () |
Negates this integer. value = -value | |
| void | Parses a string representing a hex value | ||
| void | Initializes this big int with a 64 bit integer value. | ||
| void | Sets a bit value. | ||
| void | Shift left by the specified amount of bits. | ||
| void | Shift left by 1 bit. | ||
| void | ShiftLeftInternal
(
const int32 BitCount |
Shift left by the specified amount of bits. Does not check if BitCount is valid. | |
| void | ShiftRight
(
const int32 BitCount |
Shift right by the specified amount of bits. | |
| void | Shift right by 1 bit. | ||
| void | ShiftRightInternal
(
const int32 BitCount |
Shift right by the specified amount of bits. Does not check if BitCount is valid. | |
| int32 | Sign () |
Returns the sign of this integer. | |
| void | Sqrt () |
Calculates square root of this integer. | |
| void | Subtracts two integers. | ||
| int64 | ToInt () |
Returns the value of this big int as a 64-bit integer. | |
| FString | ToString () |
Returns this big int as a string. | |
| void | Zero () |
Sets this integer to 0. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| BigInt | |||
| BigInt & | operator-- () |
||
| bool | operator!=
(
const BigInt& Other |
||
| BigInt | |||
| BigInt & | operator%=
(
const BigInt& Modulus |
||
| BigInt | |||
| BigInt & | operator&=
(
const BigInt& Other |
||
| BigInt | |||
| BigInt & | operator*=
(
const BigInt& Other |
||
| BigInt | |||
| BigInt & | operator/=
(
const BigInt& Divider |
||
| bool | operator[]
(
int32 BitIndex |
Bit indexing operator | |
| BigInt | |||
| BigInt & | operator|=
(
const BigInt& Other |
||
| BigInt | operator~ () |
||
| BigInt | |||
| BigInt & | operator++ () |
||
| BigInt & | operator+=
(
const BigInt& Other |
||
| bool | |||
| BigInt | operator<<
(
int32 Count |
||
| BigInt & | operator<<=
(
int32 Count |
||
| bool | operator<=
(
const BigInt& Other |
||
| TBigInt & | Assignment operator for int64 values. | ||
| BigInt & | operator-=
(
const BigInt& Other |
||
| bool | operator==
(
const BigInt& Other |
||
| bool | |||
| bool | operator>=
(
const BigInt& Other |
||
| BigInt | operator>>
(
int32 Count |
Begin operator overloads. | |
| BigInt & | operator>>=
(
int32 Count |
Enums
| Type | Name | Description | |
|---|---|---|---|
| API/Runtime/Core/Math/TBigInt_1 |
Typedefs
| Name | Description |
|---|---|
| BigInt |
Constants
| Name | Description |
|---|---|
| One |