Navigation
API > API/Runtime > API/Runtime/Core
N-bit integer.
| Name | TBigInt |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Math/BigInt.h |
| Include Path | #include "Math/BigInt.h" |
Syntax
template<int32 NumBits, bool bSigned>
class TBigInt
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Constructor. Initializes this big int with a string representing a hex value. | Math/BigInt.h | ||
TBigInt () |
Default constructor. Initializes the number to zero. | Math/BigInt.h | |
TBigInt
(
int64 Other |
Constructor. Initializes this big int with a 64 bit integer value. | Math/BigInt.h | |
TBigInt
(
const uint32* InBits |
Constructor. Initializes this big int with an array of words. | Math/BigInt.h | |
TBigInt
(
const uint8* InData, |
Constructor. Initializes this big int with an array of bytes. | Math/BigInt.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BigInt | TBigInt< NumBits, bSigned > | Math/BigInt.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| One | BigInt | Math/BigInt.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Bits | uint32 | All bits stored as an array of words. | Math/BigInt.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Add
(
const BigInt& Other |
Adds two integers. | Math/BigInt.h | |
void BitwiseAnd
(
const BigInt& Other |
Bitwise 'and' | Math/BigInt.h | |
void BitwiseNot() |
Bitwise 'not' | Math/BigInt.h | |
void BitwiseOr
(
const BigInt& Other |
Bitwise 'or' | Math/BigInt.h | |
void Divide
(
const BigInt& Divisor |
Divides two integers. | Math/BigInt.h | |
void DivideWithRemainder
(
const BigInt& Divisor, |
Divides two integers with remainder. | Math/BigInt.h | |
int32 GetBit
(
int32 BitIndex |
Returns a bit value as an integer value (0 or 1). | Math/BigInt.h | |
const uint32 * GetBits () |
Math/BigInt.h | ||
uint32 * GetBits () |
Math/BigInt.h | ||
int32 GetHighestNonZeroBit() |
Returns the index of the highest non-zero bit. -1 if no such bit exists. | Math/BigInt.h | |
int32 GetHighestNonZeroWord() |
Returns the index of the highest word that is not zero. -1 if no such word exists. | Math/BigInt.h | |
bool IsEqual
(
const BigInt& Other |
Checks if two integers are equal. | Math/BigInt.h | |
bool IsFirstBitSet() |
Math/BigInt.h | ||
bool IsGreater
(
const BigInt& Other |
This > Other | Math/BigInt.h | |
bool IsGreaterOrEqual
(
const BigInt& Other |
This >= Other | Math/BigInt.h | |
bool IsGreaterThanZero() |
This > 0 | Math/BigInt.h | |
bool IsLess
(
const BigInt& Other |
This < Other | Math/BigInt.h | |
bool IsLessOrEqual
(
const BigInt& Other |
This <= Other | Math/BigInt.h | |
bool IsLessThanZero() |
This < 0 | Math/BigInt.h | |
bool IsNegative() |
Checks if this integer is negative. | Math/BigInt.h | |
bool IsZero() |
This == 0 | Math/BigInt.h | |
void Modulo
(
const BigInt& Modulus |
Performs modulo operation on this integer. | Math/BigInt.h | |
void Multiply
(
const BigInt& Factor |
Multiplies two integers. | Math/BigInt.h | |
void MultiplyFast
(
const BigInt& Factor |
Multiplies two positive integers. | Math/BigInt.h | |
void Negate() |
Negates this integer. value = -value | Math/BigInt.h | |
void Parse
(
const FString& Value |
Parses a string representing a hex value | Math/BigInt.h | |
void Set
(
int64 Value |
Initializes this big int with a 64 bit integer value. | Math/BigInt.h | |
void SetBit
(
int32 BitIndex, |
Sets a bit value. | Math/BigInt.h | |
void ShiftLeft
(
const int32 BitCount |
Shift left by the specified amount of bits. | Math/BigInt.h | |
void ShiftLeftByOneInternal() |
Shift left by 1 bit. | Math/BigInt.h | |
void ShiftLeftInternal
(
const int32 BitCount |
Shift left by the specified amount of bits. Does not check if BitCount is valid. | Math/BigInt.h | |
void ShiftRight
(
const int32 BitCount |
Shift right by the specified amount of bits. | Math/BigInt.h | |
void ShiftRightByOneInternal() |
Shift right by 1 bit. | Math/BigInt.h | |
void ShiftRightInternal
(
const int32 BitCount |
Shift right by the specified amount of bits. Does not check if BitCount is valid. | Math/BigInt.h | |
int32 Sign() |
Returns the sign of this integer. | Math/BigInt.h | |
void Sqrt() |
Calculates square root of this integer. | Math/BigInt.h | |
void Subtract
(
const BigInt& Other |
Subtracts two integers. | Math/BigInt.h | |
int64 ToInt () |
Returns the value of this big int as a 64-bit integer. | Math/BigInt.h | |
FString ToString() |
Returns this big int as a string. | Math/BigInt.h | |
void Zero() |
Sets this integer to 0. | Math/BigInt.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void MakePositiveFactors
(
BigInt& FactorA, |
Makes sure both factors are positive integers and stores their original signs | Math/BigInt.h | |
static void RestoreSign
(
BigInt& Result, |
Restores a sign of a result based on the sign of two factors that produced the result. | Math/BigInt.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
BigInt operator-
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt & operator--() |
Math/BigInt.h | ||
bool operator!=
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt operator%
(
const BigInt& Modulus |
Math/BigInt.h | ||
BigInt & operator%=
(
const BigInt& Modulus |
Math/BigInt.h | ||
BigInt operator&
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt & operator&=
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt operator*
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt & operator*=
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt operator/
(
const BigInt& Divider |
Math/BigInt.h | ||
BigInt & operator/=
(
const BigInt& Divider |
Math/BigInt.h | ||
bool operator[]
(
int32 BitIndex |
Bit indexing operator | Math/BigInt.h | |
BigInt operator|
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt & operator|=
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt operator~() |
Math/BigInt.h | ||
BigInt operator+
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt & operator++() |
Math/BigInt.h | ||
BigInt & operator+=
(
const BigInt& Other |
Math/BigInt.h | ||
TBigInt & operator=
(
int64 Other |
Assignment operator for int64 values. | Math/BigInt.h | |
BigInt & operator-=
(
const BigInt& Other |
Math/BigInt.h | ||
bool operator==
(
const BigInt& Other |
Math/BigInt.h | ||
bool operator>
(
const BigInt& Other |
Math/BigInt.h | ||
bool operator>=
(
const BigInt& Other |
Math/BigInt.h | ||
BigInt operator>>
(
int32 Count |
Begin operator overloads. | Math/BigInt.h | |
BigInt & operator>>=
(
int32 Count |
Math/BigInt.h |