RxIntExt extension
Properties
- bitLength → int
-
Available on Rx<
Returns the minimum number of bits required to store this integer.int> , provided by the RxIntExt extensionno setter - isEven → bool
-
Available on Rx<
Returns true if and only if this integer is even.int> , provided by the RxIntExt extensionno setter - isOdd → bool
-
Available on Rx<
Returns true if and only if this integer is odd.int> , provided by the RxIntExt extensionno setter - sign → int
-
Available on Rx<
Returns the sign of this integer.int> , provided by the RxIntExt extensionno setter
Methods
-
abs(
) → int - Returns the absolute value of this integer.
-
ceil(
) → int -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis. -
ceilToDouble(
) → double -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis.toDouble(). -
floor(
) → int -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis. -
floorToDouble(
) → double -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis.toDouble(). -
gcd(
int other) → int -
Available on Rx<
Returns the greatest common divisor of this integer andint> , provided by the RxIntExt extensionother. -
modInverse(
int modulus) → int -
Available on Rx<
Returns the modular multiplicative inverse of this integer moduloint> , provided by the RxIntExt extensionmodulus. -
modPow(
int exponent, int modulus) → int -
Available on Rx<
Returns this integer to the power ofint> , provided by the RxIntExt extensionexponentmodulomodulus. -
round(
) → int -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis. -
roundToDouble(
) → double -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis.toDouble(). -
toSigned(
int width) → int -
Available on Rx<
Returns the least significantint> , provided by the RxIntExt extensionwidthbits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit inwidthbits 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 Rx<
Returns the least significantint> , provided by the RxIntExt extensionwidthbits 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 Rx<
Returnsint> , provided by the RxIntExt extensionthis. -
truncateToDouble(
) → double -
Available on Rx<
Returnsint> , provided by the RxIntExt extensionthis.toDouble().
Operators
-
operator &(
int other) → int - Bit-wise and operator.
-
operator <<(
int shiftAmount) → int -
Available on Rx<
Shift the bits of this integer to the left byint> , provided by the RxIntExt extensionshiftAmount. -
operator >>(
int shiftAmount) → int -
Available on Rx<
Shift the bits of this integer to the right byint> , provided by the RxIntExt extensionshiftAmount. -
operator ^(
int other) → int - Bit-wise exclusive-or operator.
-
operator unary-(
) → int - Return the negative value of this integer.
-
operator |(
int other) → int - Bit-wise or operator.
-
operator ~(
) → int - The bit-wise negate operator.