Urho3D
Public Types | Public Member Functions | Private Attributes | List of all members
Urho3D::BigInt Class Reference

Public Types

using Digit = i64
 i64 can conatins 10^9 * 10^9.
 

Public Member Functions

 BigInt (const String &str)
 
 BigInt (i32 value)
 
 BigInt (i64 value)
 
 BigInt (u32 value)
 
 BigInt (u64 value)
 
bool IsPositive () const
 
bool IsNegative () const
 
bool IsZero () const
 
bool operator== (const BigInt &rhs) const
 
bool operator!= (const BigInt &rhs) const
 
bool operator< (const BigInt &rhs) const
 
bool operator> (const BigInt &rhs) const
 
bool operator<= (const BigInt &rhs) const
 
bool operator>= (const BigInt &rhs) const
 
BigInt operator+ (const BigInt &rhs) const
 
BigInt operator- (const BigInt &rhs) const
 
BigInt operator* (const BigInt &rhs) const
 
BigInt operator/ (const BigInt &rhs) const
 Return 0 if rhs zero.
 
BigInt operator% (const BigInt &rhs) const
 Return 0 if rhs zero.
 
BigInt operator- () const
 
BigIntoperator+= (const BigInt &rhs)
 
BigIntoperator-= (const BigInt &rhs)
 
BigIntoperator*= (const BigInt &rhs)
 
BigIntoperator/= (const BigInt &rhs)
 
BigIntoperator%= (const BigInt &rhs)
 
BigIntoperator++ ()
 Prefix increment operator.
 
BigInt operator++ (int x)
 Postfix increment operator.
 
BigIntoperator-- ()
 Prefix decrement operator.
 
BigInt operator-- (int x)
 Postfix decrement operator.
 
String ToString () const
 

Private Attributes

bool positive_
 Sign (zero is positive).
 
Vector< Digitmagnitude_
 Array of digits with base 10^9 and reverse order (each element contains value in range [0 .. BASE-1]).
 

The documentation for this class was generated from the following files: