Point
A point with x, y, z values. It may also be referred to as a Vector.
Static Method Summary
| Static Public Methods | ||
| public static |
Returns a copy of a point. |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(x: number, y: number, z: number) An x, y, z point. |
|
Member Summary
| Public Members | ||
| public |
x: * {number} X position of the point. |
|
| public |
y: * {number} Y position of the point. |
|
| public |
z: * {number} Z position of the point. |
|
Method Summary
| Public Methods | ||
| public |
Adds the point by a number(s). |
|
| public |
Divides the point by a number. |
|
| public |
length(): * Gets the length of this point as a vector. |
|
| public |
Multiplies the point by a number. |
|
| public |
Normalizes this vector to a unit vector. |
|
| public |
Sets the point to a new x, y, z. |
|
| public |
Subtracts the point by a number(s). |
|
Static Public Methods
Public Constructors
Public Members
Public Methods
public add(divX: number, divY: number, divZ: number): Point source
Adds the point by a number(s). The first parameter will define all x, y, z values for addition if the 2nd and 3rd are not specified.
public divide(divX: number, divY: number, divZ: number): Point source
Divides the point by a number. The first parameter will define all x, y, z values for division if the 2nd and 3rd are not specified.
public length(): * source
Gets the length of this point as a vector. sqrt(x^2 + y^2 + z^2).
Return:
| * |
public multiply(divX: number, divY: number, divZ: number): Point source
Multiplies the point by a number. The first parameter will define all x, y, z values for multiplication if the 2nd and 3rd are not specified.
public set(x: number, y: number, z: number) source
Sets the point to a new x, y, z. Previous values are set as default parameters.
