ObjIntExt extension
Properties
- bitLength → int
-
Available on Obj<
Returns the minimum number of bits required to store this integer.int> , provided by the ObjIntExt extensionno setter - isEven → bool
-
Available on Obj<
Returns true if and only if this integer is even.int> , provided by the ObjIntExt extensionno setter - isOdd → bool
-
Available on Obj<
Returns true if and only if this integer is odd.int> , provided by the ObjIntExt extensionno setter - sign → int
-
Available on Obj<
Returns the sign of this integer.int> , provided by the ObjIntExt extensionno setter
Methods
-
abs(
) → int - Returns the absolute value of this integer.
-
ceil(
) → int -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis
. -
ceilToDouble(
) → double -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis.toDouble()
. -
floor(
) → int -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis
. -
floorToDouble(
) → double -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis.toDouble()
. -
gcd(
int other) → int -
Available on Obj<
Returns the greatest common divisor of this integer andint> , provided by the ObjIntExt extensionother
. -
modInverse(
int modulus) → int -
Available on Obj<
Returns the modular multiplicative inverse of this integer moduloint> , provided by the ObjIntExt extensionmodulus
. -
modPow(
int exponent, int modulus) → int -
Available on Obj<
Returns this integer to the power ofint> , provided by the ObjIntExt extensionexponent
modulomodulus
. -
round(
) → int -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis
. -
roundToDouble(
) → double -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis.toDouble()
. -
toRadixString(
int radix) → String -
Available on Obj<
Convertsint> , provided by the ObjIntExt extensionthis
to a string representation in the givenradix
. -
toSigned(
int width) → int -
Available on Obj<
Returns the least significantint> , provided by the ObjIntExt extensionwidth
bits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit inwidth
bits using an signed 2-s complement representation. The returned value has the same bit value in all positions higher thanwidth
. -
toUnsigned(
int width) → int -
Available on Obj<
Returns the least significantint> , provided by the ObjIntExt extensionwidth
bits of this integer as a non-negative number (i.e. unsigned representation). The returned value has zeros in all bit positions higher thanwidth
. -
truncate(
) → int -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis
. -
truncateToDouble(
) → double -
Available on Obj<
Returnsint> , provided by the ObjIntExt extensionthis.toDouble()
.
Operators
-
operator &(
Obj< int> other) → Obj<int> - Bit-wise and operator.
-
operator <<(
Obj< int> shiftAmount) → Obj<int> -
Available on Obj<
Shift the bits of this integer to the left byint> , provided by the ObjIntExt extensionshiftAmount
. -
operator >>(
Obj< int> shiftAmount) → Obj<int> -
Available on Obj<
Shift the bits of this integer to the right byint> , provided by the ObjIntExt extensionshiftAmount
. -
operator >>>(
Obj< int> shiftAmount) → Obj<int> -
Available on Obj<
Bitwise unsigned right shift byint> , provided by the ObjIntExt extensionshiftAmount
bits. -
operator ^(
Obj< int> other) → Obj<int> - Bit-wise exclusive-or operator.
-
operator unary-(
) → Obj< int> - Return the negative value of this integer.
-
operator |(
Obj< int> other) → Obj<int> - Bit-wise or operator.
-
operator ~(
) → Obj< int> - The bit-wise negate operator.