Class: Coordinate3D

Coordinate3D(x, y, z)

3D Coordinates in LevelZ

Constructor

new Coordinate3D(x, y, z)

Constructs a new 3D Coordinate.
Parameters:
Name Type Description
x number The X Value
y number The Y Value
z number The Z Value
Source:
Example
new Coordinate3D(1, 2, 3) 

Extends

Classes

Coordinate3D

Members

dimension

Returns the dimension of this Coordinate.
Overrides:
Source:

magnitude

Returns the magnitude of this Coordinate.
Overrides:
Source:

x :number

The X value for this 3D Coordinate.
Type:
  • number
Source:

y :number

The Y value for this 3D Coordinate.
Type:
  • number
Source:

z :number

The Z value for this 3D Coordinate.
Type:
  • number
Source:

(static) zero

Returns a new 3D Coordinate with X, Y and Z at `0`.
Source:

Methods

toString() → {string}

Returns the string representation of this 3D Coordinate.
Source:
Returns:
The string representation of this 3D Coordinate.
Type
string

(static) fromString(str) → {Coordinate3D}

Converts a string to a 3D Coordinate.
Parameters:
Name Type Description
str string The string to convert
Source:
Returns:
The 3D Coordinate
Type
Coordinate3D
Example
Coordinate3D.fromString('[1, 2, 3]')