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