CPDim

final case class CPDim(width: Int, height: Int) extends Ordered[CPDim] with Serializable

2D dimension immutable container.

Value parameters:
height

Height in characters.

width

Width in characters.

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

Value members

Constructors

def this(d: Int)

Creates dxd square dimension.

Creates dxd square dimension.

Value parameters:
d

Square dimension.

Source:
CPDim.scala

Concrete methods

@targetName("lessThanOrEqual")
infix def <=@(that: CPDim): Boolean

Tests whether this dimension is less than or equal to the given one. Note that this operation will check that both width and height are less than or equal.

Tests whether this dimension is less than or equal to the given one. Note that this operation will check that both width and height are less than or equal.

Value parameters:
that

Other dimension to check.

Source:
CPDim.scala
@targetName("lessThan")
infix def <@(that: CPDim): Boolean

Tests whether this dimension is less than the given one. Note that this operation will check that both width and height are less than.

Tests whether this dimension is less than the given one. Note that this operation will check that both width and height are less than.

Value parameters:
that

Other dimension to check.

Source:
CPDim.scala
@targetName("greaterThanOrEqual")
infix def >=@(that: CPDim): Boolean

Tests whether this dimension is less than or greater to the given one. Note that this operation will check that both width and height are greater than or equal.

Tests whether this dimension is less than or greater to the given one. Note that this operation will check that both width and height are greater than or equal.

Value parameters:
that

Other dimension to check.

Source:
CPDim.scala
@targetName("greaterThan")
infix def >@(that: CPDim): Boolean

Tests whether this dimension is greater than the given one. Note that this operation will check that both width and height are greater than.

Tests whether this dimension is greater than the given one. Note that this operation will check that both width and height are greater than.

Value parameters:
that

Other dimension to check.

Source:
CPDim.scala
override def compare(that: CPDim): Int
Definition Classes
Ordered
Source:
CPDim.scala
override def toString: String
Definition Classes
CPIntTuple -> Any
Source:
CPDim.scala

Inherited methods

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

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[CPDim]): CPDim

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): CPDim

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[_]): CPDim

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): CPDim

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[CPDim]): CPDim

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): CPDim

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[CPDim]): CPDim

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: CPDim): 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: CPDim): 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: CPDim): 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: CPDim): 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: CPDim): Int
Inherited from:
Ordered
inline def copy: CPDim

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): CPDim

Maps this tuple using given function.

Maps this tuple using given function.

Value parameters:
f

Mapping function.

Inherited from:
CPIntTuple (hidden)
Source:
CPIntTuple.scala
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

final val area: Int

Area in characters for this dimension.

Area in characters for this dimension.

Source:
CPDim.scala
val h: Int

Height in characters (shortcut API).

Height in characters (shortcut API).

Source:
CPDim.scala
val hF: Float

Height in characters as float (shortcut API).

Height in characters as float (shortcut API).

Source:
CPDim.scala
final val isEmpty: Boolean

Whether width or height equals to zero.

Whether width or height equals to zero.

Source:
CPDim.scala
final val nonEmpty: Boolean

Whether width and height are greater than zero.

Whether width and height are greater than zero.

Source:
CPDim.scala
val w: Int

Width in characters (shortcut API).

Width in characters (shortcut API).

Source:
CPDim.scala
val wF: Float

Width in characters as float (shortcut API).

Width in characters as float (shortcut API).

Source:
CPDim.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