Constructor
new Point3d(coordinates)
Create a point
Parameters:
Name | Type | Description |
---|---|---|
coordinates |
Object | Coordinates of new point |
Classes
Members
(readonly) x
Get the x coordinate of the point
(readonly) y
Get the y coordinate of the point
(readonly) z
Get the z coordinate of the point
Methods
cross(point) → {Point3d}
Compute the vector or cross product with another Point
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3d | The point to compute the product with |
Returns:
- Type
- Point3d
dot(point) → {number}
Compute the scalar or dot product with another Point
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3d | The point to compute the product with |
Returns:
- Type
- number
equals(point) → {boolean}
Check for equality with another Point3D
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3d | The point to compare |
Returns:
- Type
- boolean
minus(point) → {Point3d}
Subtract another Point3D
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3d | The point to subtract |
Returns:
- Type
- Point3d
plus(point) → {Point3d}
Add to another Point3D
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3d | The point to add |
Returns:
- Type
- Point3d
scale(scalar) → {Point3d}
Scale the point
Parameters:
Name | Type | Description |
---|---|---|
scalar |
number | The value to scale by |
Returns:
- Type
- Point3d