int
extends Object with SerializableSupertypes
Object, SerializableMembers
%
= Nothing <: IntRemainder of the division of X
by Y
.
Remainder of the division of X
by Y
.
val mod: 5 % 2 = 1
*
= Nothing <: IntMultiplication of two Int
singleton types.
Multiplication of two Int
singleton types.
val mul: 4 * 2 = 8
+
= Nothing <: IntAddition of two Int
singleton types.
Addition of two Int
singleton types.
val sum: 2 + 2 = 4
-
= Nothing <: IntSubtraction of two Int
singleton types.
Subtraction of two Int
singleton types.
val sub: 4 - 2 = 2
/
= Nothing <: IntInteger division of two Int
singleton types.
Integer division of two Int
singleton types.
val div: 5 / 2 = 2
<
= Nothing <: BooleanLess-than comparison of two Int
singleton types.
Less-than comparison of two Int
singleton types.
val lt1: 4 < 2 = false
val lt2: 2 < 4 = true
<<
= Nothing <: IntBinary left shift of X
by Y
.
Binary left shift of X
by Y
.
val lshift: 1 << 2 = 4
<=
= Nothing <: BooleanLess-or-equal comparison of two Int
singleton types.
Less-or-equal comparison of two Int
singleton types.
val lt1: 4 <= 2 = false
val lt2: 2 <= 2 = true
>
= Nothing <: BooleanGreater-than comparison of two Int
singleton types.
Greater-than comparison of two Int
singleton types.
val gt1: 4 > 2 = true
val gt2: 2 > 2 = false
>=
= Nothing <: BooleanGreater-or-equal comparison of two Int
singleton types.
Greater-or-equal comparison of two Int
singleton types.
val ge1: 4 >= 2 = true
val ge2: 2 >= 3 = false
>>
= Nothing <: IntBinary right shift of X
by Y
.
Binary right shift of X
by Y
.
val rshift: 10 >> 1 = 5
>>>
= Nothing <: IntBinary right shift of X
by Y
, filling the left with zeros.
Binary right shift of X
by Y
, filling the left with zeros.
val rshiftzero: 10 >>> 1 = 5
Abs
= Nothing <: IntAbsolute value of an Int
singleton type.
Absolute value of an Int
singleton type.
val abs: Abs[-1] = 1
BitwiseAnd
= Nothing <: IntBitwise and of X
and Y
.
Bitwise and of X
and Y
.
val and1: BitwiseAnd[4, 4] = 4
val and2: BitwiseAnd[10, 5] = 0
BitwiseOr
= Nothing <: IntBitwise or of X
and Y
.
Bitwise or of X
and Y
.
val or: BitwiseOr[10, 11] = 11
Max
= Nothing <: IntMaximum of two Int
singleton types.
Maximum of two Int
singleton types.
val max: Max[-1, 1] = 1
Min
= Nothing <: IntMinimum of two Int
singleton types.
Minimum of two Int
singleton types.
val min: Min[-1, 1] = -1
Negate
= Nothing <: IntNegation of an Int
singleton type.
Negation of an Int
singleton type.
val neg1: Neg[-1] = 1
val neg2: Neg[1] = -1
ToString
= Nothing <: StringString conversion of an Int
singleton type.
String conversion of an Int
singleton type.
val abs: ToString[1] = "1"
^
= Nothing <: IntBitwise xor of X
and Y
.
Bitwise xor of X
and Y
.
val xor: 10 ^ 30 = 20