CPInt2

final class CPInt2(val i1: Int, val i2: Int) extends Ordered[CPInt2]

General 2-int tuple.

Value parameters:
i1

1st integer.

i2

2nd integer.

Companion:
object
Source:
CPInt2.scala
trait Ordered[CPInt2]
trait Comparable[CPInt2]
trait Serializable
class Object
trait Matchable
class Any

Value members

Constructors

def this(i: Int)

Creates tuple with two i elements.

Creates tuple with two i elements.

Value parameters:
i

Tuple value.

Source:
CPInt2.scala

Concrete methods

inline override def compare(that: CPInt2): Int
Definition Classes
Ordered
Source:
CPInt2.scala

Inherited methods

@targetName("multiInt")
inline def *(x: Int): CPInt2

Multiplies given value with each member of this tuple.

Multiplies given value with each member of this tuple.

Value parameters:
x

Value to multiple by.

Returns:

New tuple as a result of multiplication.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("multiIntTuple")
inline def *(x: CPIntTuple[CPInt2]): CPInt2

Multiple two tuples by multiplying their corresponding values.

Multiple two tuples by multiplying their corresponding values.

Value parameters:
x

Other tuple to multiply with.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("plusInt")
inline def +(x: Int): CPInt2

Adds given value to each member of this tuple.

Adds given value to each member of this tuple.

Value parameters:
x

Value to add.

Returns:

New tuple as a result of addition.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("plusIntTuple")
inline def +(x: CPIntTuple[_]): CPInt2

Adds two tuples by adding their corresponding values.

Adds two tuples by adding their corresponding values.

Value parameters:
x

Tuple to add.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("minusInt")
inline def -(x: Int): CPInt2

Subtracts given value from each member of this tuple.

Subtracts given value from each member of this tuple.

Value parameters:
x

Value to subtract.

Returns:

New tuple as a result of subtraction.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("minusIntTuple")
inline def -(x: CPIntTuple[CPInt2]): CPInt2

Subtracts given tuple from this one by subtracting their corresponding values.

Subtracts given tuple from this one by subtracting their corresponding values.

Value parameters:
x

Tuple to subtract.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("divideInt")
inline def /(x: Int): CPInt2

Divides each member of this tuple by the given value.

Divides each member of this tuple by the given value.

Value parameters:
x

Value to divide by.

Returns:

New tuple as a result of division.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("divideIntTuple")
inline def /(x: CPIntTuple[CPInt2]): CPInt2

Device this tuple by the given tuple by dividing their corresponding values.

Device this tuple by the given tuple by dividing their corresponding values.

Value parameters:
x

Other tuple to divide by.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
def <(that: CPInt2): Boolean
Inherited from:
Ordered
@targetName("lessInt")
inline def <(x: Int): Boolean

Less-then '<' operator for int.

Less-then '<' operator for int.

Value parameters:
x

Other tuple to compare.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("lessTuple")
inline def <(x: CPIntTuple[_]): Boolean

Less-then '<' operator for tuples.

Less-then '<' operator for tuples.

Value parameters:
x

Other tuple to compare.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
def <=(that: CPInt2): Boolean
Inherited from:
Ordered
@targetName("lessThenOrEqualTuple")
inline def <=(x: CPIntTuple[_]): Boolean

Less-then-or-equal '<=' operator for tuples.

Less-then-or-equal '<=' operator for tuples.

Value parameters:
x

Other tuple to compare.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("lessThenOrEqualInt")
inline def <=(x: Int): Boolean

Less-then-or-equal '<=' operator for int.

Less-then-or-equal '<=' operator for int.

Value parameters:
x

Other tuple to compare.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
def >(that: CPInt2): Boolean
Inherited from:
Ordered
@targetName("greaterTuple")
inline def >(x: CPIntTuple[_]): Boolean

Greater-then '>' operator for tuples.

Greater-then '>' operator for tuples.

Value parameters:
x

Other tuple to compare.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("greaterInt")
inline def >(x: Int): Boolean

Greater-then '>' operator for int.

Greater-then '>' operator for int.

Value parameters:
x

Other tuple to compare.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
def >=(that: CPInt2): Boolean
Inherited from:
Ordered
@targetName("greaterThenOrEqualTuple")
inline def >=(x: CPIntTuple[_]): Boolean

Greater-then-or-equal '>=' operator for tuples.

Greater-then-or-equal '>=' operator for tuples.

Value parameters:
x

Other tuple to compare.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
@targetName("greaterThenOrEqualInt")
inline def >=(x: Int): Boolean

Greater-then-or-equal '>=' operator for int.

Greater-then-or-equal '>=' operator for int.

Value parameters:
x

Other tuple to compare.

Note:

Tuples must have the same arity.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
def compareTo(that: CPInt2): Int
Inherited from:
Ordered
inline def copy: CPInt2

Creates a copy of this tuple.

Creates a copy of this tuple.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
override def equals(obj: Any): Boolean
Definition Classes
CPIntTuple -> Any
Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
inline def isOne: Boolean

Tests whether all values in this tuple are one.

Tests whether all values in this tuple are one.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
inline def isPositive: Boolean

Checks if this tuple contains only positive (> 0) numbers.

Checks if this tuple contains only positive (> 0) numbers.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
inline def isWhole: Boolean

Checks if this tuple contains only whole (>= 0) numbers.

Checks if this tuple contains only whole (>= 0) numbers.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
inline def isZero: Boolean

Tests whether all values in this tuple are zero.

Tests whether all values in this tuple are zero.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
inline def mapInt(f: Int => Int): CPInt2

Maps this tuple using given function.

Maps this tuple using given function.

Value parameters:
f

Mapping function.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
override def toString: String
Definition Classes
CPIntTuple -> Any
Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala

Concrete fields

val i1: Int
val i2: Int
val x: Int

X-coordinate accessor (returns i1 value). Allows to treat this type as XY-coordinate holder.

X-coordinate accessor (returns i1 value). Allows to treat this type as XY-coordinate holder.

Source:
CPInt2.scala
val y: Int

Y-coordinate accessor (returns i2 value). Allows to treat this type as XY-coordinate holder.

Y-coordinate accessor (returns i2 value). Allows to treat this type as XY-coordinate holder.

Source:
CPInt2.scala

Inherited fields

val arity: Int

Arity of this tuple.

Arity of this tuple.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
val ints: Int*
Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala