Spacing

Immutable Spacing class. Warning: the input array is NOT cloned, modifying it will modify the index values.

Constructor

new Spacing(values)

Parameters:
NameTypeDescription
valuesArray

The spacing values.

Classes

Spacing

Methods

equals(rhs) → {boolean}

Check for equality.

Parameters:
NameTypeDescription
rhsSpacing

The object to compare to.

Returns:

True if both objects are equal.

Type: 
boolean

get(i) → {number}

Get the spacing value at the given array index.

Parameters:
NameTypeDescription
inumber

The index to get.

Returns:

The value.

Type: 
number

get2D() → {object}

Get the 2D base of this size.

Returns:

The 2D base [col,row] as {x,y}.

Type: 
object

getValues() → {Array}

Get the values of this spacing.

Returns:

The array of values.

Type: 
Array

length() → {number}

Get the length of the spacing.

Returns:

The length.

Type: 
number

toString() → {string}

Get a string representation of the spacing.

Returns:

The spacing as a string.

Type: 
string