new Point(values)
Immutable point. Warning: the input array is NOT cloned, modifying it will modify the index values.
Name | Type | Description |
---|---|---|
values | Array | The point values. |
- Source
Methods
add(rhs) → {dwv.math.Point}
Add another point to this one.
Name | Type | Description |
---|---|---|
rhs | dwv. | The point to add. |
- Source
The point representing the sum of both points.
- Type:
- dwv.
math. Point
canCompare(rhs) → {boolean}
Check if the input point can be compared to this one.
Name | Type | Description |
---|---|---|
rhs | dwv. | The point to compare to. |
- Source
True if both points are comparable.
- Type:
- boolean
compare(rhs) → {Array}
Compare points and return different dimensions.
Name | Type | Description |
---|---|---|
rhs | dwv. | The point to compare to. |
- Source
The list of different dimensions.
- Type:
- Array
equals(rhs) → {boolean}
Check for Point equality.
Name | Type | Description |
---|---|---|
rhs | dwv. | The point to compare to. |
- Source
True if both points are equal.
- Type:
- boolean
get(i) → {number}
Get the index value at the given array index.
Name | Type | Description |
---|---|---|
i | number | The index to get. |
- Source
The value.
- Type:
- number
get3D() → {dwv.math.Point3D}
Get the 3D part of this point.
- Source
The Point3D.
- Type:
- dwv.
math. Point3D
getValues() → {Array}
Get the values of this index.
- Source
The array of values.
- Type:
- Array
length() → {number}
Get the length of the index.
- Source
The length.
- Type:
- number
mergeWith3D(rhs) → {dwv.math.Point}
Merge this point with a Point3D to create a new point.
Name | Type | Description |
---|---|---|
rhs | dwv. | The Point3D to merge with. |
- Source
The merge result.
- Type:
- dwv.
math. Point
toString() → {string}
Get a string representation of the Index.
- Source
The Index as a string.
- Type:
- string