Int64 extension type

Signed 64-bit integer wrapper used by the xlang type system.

on
Implemented types
Available extensions

Constructors

Int64(int value)
Creates a signed 64-bit value by truncating value to 64 bits.
factory
Int64.fromBigInt(BigInt value)
Creates a signed 64-bit value by truncating value to 64 bits.
factory
Int64.fromWords(int low32, int high32)
Creates a signed 64-bit value from little-endian 32-bit words.
factory
Int64.parseHex(String value)
Parses a hexadecimal two's-complement payload.
factory

Properties

address → Pointer<Never>

Available on int, provided by the IntAddress extension

The memory address of the underlying data.
no setter
bitLength → int
Returns the minimum number of bits required to store this integer.
no setterinherited
hashCode → int
Returns a hash code for a numerical value.
no setterinherited
high32Signed → int
Returns the high 32 bits as a signed integer.
no setter
high32Unsigned → int
Returns the high 32 bits as an unsigned integer.
no setter
isEven → bool
Returns true if and only if this integer is even.
no setterinherited
isFinite → bool
Whether this number is finite.
no setterinherited
isInfinite → bool
Whether this number is positive infinity or negative infinity.
no setterinherited
isNaN → bool
Whether this number is a Not-a-Number value.
no setterinherited
isNegative → bool
Returns whether this value is negative.
no setter
isOdd → bool
Returns true if and only if this integer is odd.
no setterinherited
isZero → bool
Returns whether this value is zero.
no setter
low32 → int
Returns the low 32 bits as an unsigned integer.
no setter
oneBitCount → int
The number of 1 bits in the binary representation of this integer.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sign → int
Returns the sign of this integer.
no setterinherited
toJS → JSNumber

Available on num, provided by the NumToJSExtension extension

Converts this num to a JSNumber.
no setter
trailingZeroBitCount → int
The number of trailing (least significant) zero bits in the binary representation of this integer.
no setterinherited
value → int
The normalized signed 64-bit value on native platforms.
no setter

Methods

abs() → int
Returns the absolute value of this integer.
inherited
ceil() → int
Returns this.
inherited
ceilToDouble() → double
Returns this.toDouble().
inherited
clamp(num lowerLimit, num upperLimit) → num
Returns this num clamped to be in the range lowerLimit-upperLimit.
inherited
compareTo(Int64 other) → int
Compares this to other.
floor() → int
Returns this.
inherited
floorToDouble() → double
Returns this.toDouble().
inherited
gcd(int other) → int
Returns the greatest common divisor of this integer and other.
inherited
modInverse(int modulus) → int
Returns the modular multiplicative inverse of this integer modulo modulus.
inherited
modPow(int exponent, int modulus) → int
Returns this integer to the power of exponent modulo modulus.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remainder(num other) → num
The remainder of the truncating division of this by other.
inherited
round() → int
Returns this.
inherited
roundToDouble() → double
Returns this.toDouble().
inherited
toBigInt() → BigInt
Returns the exact value as a BigInt.
toDouble() → double
This number as a double.
inherited
toInt() → int
Returns the exact native int value.
toRadixString(int radix) → String
Converts this int to a string representation in the given radix.
inherited
toSigned(int width) → int
Returns the least significant width bits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit in width bits using an signed 2-s complement representation. The returned value has the same bit value in all positions higher than width.
inherited
toString() → String
Returns a string representation of this integer.
inherited
toStringAsExponential([int? fractionDigits]) → String
An exponential string-representation of this number.
inherited
toStringAsFixed(int fractionDigits) → String
A decimal-point string-representation of this number.
inherited
toStringAsPrecision(int precision) → String
A string representation with precision significant digits.
inherited
toUnsigned(int width) → int
Returns the least significant width bits of this integer as a non-negative number (i.e. unsigned representation). The returned value has zeros in all bit positions higher than width.
inherited
truncate() → int
Returns this.
inherited
truncateToDouble() → double
Returns this.toDouble().
inherited

Operators

operator %(Object other) → Int64
Euclidean modulo of this number by other.
operator &(Object other) → Int64
Bit-wise and operator.
operator *(Object other) → Int64
Multiplies this number by other.
operator +(Object other) → Int64
Adds other to this number.
operator -(Object other) → Int64
Subtracts other from this number.
operator /(Object other) → double
Divides this number by other.
operator <(Object other) → bool
Whether this number is numerically smaller than other.
operator <<(int shift) → Int64
Shift the bits of this integer to the left by shiftAmount.
operator <=(Object other) → bool
Whether this number is numerically smaller than or equal to other.
operator ==(Object other) → bool
Test whether this value is numerically equal to other.
inherited
operator >(Object other) → bool
Whether this number is numerically greater than other.
operator >=(Object other) → bool
Whether this number is numerically greater than or equal to other.
operator >>(int shift) → Int64
Shift the bits of this integer to the right by shiftAmount.
operator >>>(int shift) → Int64
Bitwise unsigned right shift by shiftAmount bits.
operator ^(Object other) → Int64
Bit-wise exclusive-or operator.
operator unary-() → Int64
Subtracts other from this number.
operator |(Object other) → Int64
Bit-wise or operator.
operator ~() → Int64
The bit-wise negate operator.
operator ~/(Object other) → Int64
Truncating division operator.