RxIntExt extension

on

Properties

bitLength int

Available on Rx<int>, provided by the RxIntExt extension

Returns the minimum number of bits required to store this integer.
no setter
isEven bool

Available on Rx<int>, provided by the RxIntExt extension

Returns true if and only if this integer is even.
no setter
isOdd bool

Available on Rx<int>, provided by the RxIntExt extension

Returns true if and only if this integer is odd.
no setter
sign int

Available on Rx<int>, provided by the RxIntExt extension

Returns the sign of this integer.
no setter

Methods

abs() int

Available on Rx<int>, provided by the RxIntExt extension

Returns the absolute value of this integer.
ceil() int

Available on Rx<int>, provided by the RxIntExt extension

Returns this.
ceilToDouble() double

Available on Rx<int>, provided by the RxIntExt extension

Returns this.toDouble().
floor() int

Available on Rx<int>, provided by the RxIntExt extension

Returns this.
floorToDouble() double

Available on Rx<int>, provided by the RxIntExt extension

Returns this.toDouble().
gcd(int other) int

Available on Rx<int>, provided by the RxIntExt extension

Returns the greatest common divisor of this integer and other.
modInverse(int modulus) int

Available on Rx<int>, provided by the RxIntExt extension

Returns the modular multiplicative inverse of this integer modulo modulus.
modPow(int exponent, int modulus) int

Available on Rx<int>, provided by the RxIntExt extension

Returns this integer to the power of exponent modulo modulus.
round() int

Available on Rx<int>, provided by the RxIntExt extension

Returns this.
roundToDouble() double

Available on Rx<int>, provided by the RxIntExt extension

Returns this.toDouble().
toSigned(int width) int

Available on Rx<int>, provided by the RxIntExt extension

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.
toUnsigned(int width) int

Available on Rx<int>, provided by the RxIntExt extension

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.
truncate() int

Available on Rx<int>, provided by the RxIntExt extension

Returns this.
truncateToDouble() double

Available on Rx<int>, provided by the RxIntExt extension

Returns this.toDouble().

Operators

operator &(int other) int

Available on Rx<int>, provided by the RxIntExt extension

Bit-wise and operator.
operator <<(int shiftAmount) int

Available on Rx<int>, provided by the RxIntExt extension

Shift the bits of this integer to the left by shiftAmount.
operator >>(int shiftAmount) int

Available on Rx<int>, provided by the RxIntExt extension

Shift the bits of this integer to the right by shiftAmount.
operator ^(int other) int

Available on Rx<int>, provided by the RxIntExt extension

Bit-wise exclusive-or operator.
operator unary-() int

Available on Rx<int>, provided by the RxIntExt extension

Return the negative value of this integer.
operator |(int other) int

Available on Rx<int>, provided by the RxIntExt extension

Bit-wise or operator.
operator ~() int

Available on Rx<int>, provided by the RxIntExt extension

The bit-wise negate operator.