goog.math.Coordinate3 |
goog.math.Vec3 | goog.math.Coordinate3 |
opt_x
: number=
X coordinate, defaults to 0.
|
opt_y
: number=
Y coordinate, defaults to 0.
|
opt_z
: number=
Z coordinate, defaults to 0.
|
Returns a new copy of the coordinate.
Returns: !goog.math.Coordinate3
A clone of this coordinate.
|
code » | |
Returns the contents of this coordinate as a 3 value Array.
|
code » | |
Returns a nice string representing the coordinate.
Returns: string
In the form (50, 73, 31).
|
code » |
Returns the difference between two coordinates as a new
goog.math.Coordinate3.
Arguments:
|
code » | |||
Returns the distance between two coordinates.
Arguments:
|
code » | |||
Compares coordinates for equality.
Arguments:
Returns: boolean
True iff the coordinates are equal, or if both are null.
|
code » | |||
Converts a three element array into a Coordinate3 object. If the value
passed in is not an array, not array-like, or not of the right length, an
error is thrown.
Returns: !goog.math.Coordinate3
A new coordinate from the array values.
|
code » | |||
Returns the squared distance between two coordinates. Squared distances can
be used for comparisons when the actual value is not required.
Performance note: eliminating the square root is an optimization often used
in lower-level languages, but the speed difference is not nearly as
pronounced in JavaScript (only a few percent.)
Arguments:
|
code » |