Spacing
Source: spacing.js:10
Immutable Spacing class. Warning: the input array is NOT cloned, modifying it will modify the index values.
Constructor
new Spacing(values: Array.<number>): SpacingParameters
values(Array.<number>) — The spacing values.
Instance Methods
get(i: number): number
Get the spacing value at the given array index.
Parameters
i(number) — The index to get.
Returns
number— The value.
length(): number
Get the length of the spacing.
Returns
number— The length.
toString(): string
Get a string representation of the spacing.
Returns
string— The spacing as a string.
getValues(): Array.<number>
Get the values of this spacing.
Returns
Array.<number>— The array of values.
equals(rhs: Spacing): boolean
Check for equality.
Parameters
rhs(Spacing) — The object to compare to.
Returns
boolean— True if both objects are equal.
get2D(): Scalar2D
Get the 2D base of this size.
Returns
Scalar2D— The 2D base [col,row] as {x,y}.