coordinate3.js
No description.

File Location

/goog/math/coordinate3.js

Classes

goog.math.Coordinate3
Class for representing coordinates and positions in 3 dimensions.

Public Protected Private

Global Functions

goog.math.Coordinate3.difference(ab) !goog.math.Coordinate3
Returns the difference between two coordinates as a new goog.math.Coordinate3.
Arguments:
a : goog.math.Coordinate3
A Coordinate3.
b : goog.math.Coordinate3
A Coordinate3.
Returns: !goog.math.Coordinate3  A Coordinate3 representing the difference between a and b.
code »
goog.math.Coordinate3.distance(ab) number
Returns the distance between two coordinates.
Arguments:
a : goog.math.Coordinate3
A Coordinate3.
b : goog.math.Coordinate3
A Coordinate3.
Returns: number  The distance between a and b.
code »
goog.math.Coordinate3.equals(ab) boolean
Compares coordinates for equality.
Arguments:
a : goog.math.Coordinate3
A Coordinate3.
b : goog.math.Coordinate3
A Coordinate3.
Returns: boolean  True iff the coordinates are equal, or if both are null.
code »
goog.math.Coordinate3.fromArray(a) !goog.math.Coordinate3
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.
Arguments:
a : Array.<number>
Array of numbers to become a coordinate.
Returns: !goog.math.Coordinate3  A new coordinate from the array values.
code »
goog.math.Coordinate3.squaredDistance(ab) number
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:
a : goog.math.Coordinate3
A Coordinate3.
b : goog.math.Coordinate3
A Coordinate3.
Returns: number  The squared distance between a and b.
code »

Directory math

File Reference