Returns the difference between two coordinates as a new
goog.math.Coordinate.
Arguments:
Returns:
A Coordinate representing the difference between {@code a} and {@code b}.
|
code » | |||
Returns the distance between two coordinates.
Arguments:
Returns:
The distance between {@code a} and {@code b}.
|
code » | |||
Compares coordinates for equality.
Arguments:
Returns:
True iff the coordinates are equal, or if both are null.
|
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:
Returns:
The squared distance between {@code a} and {@code b}.
|
code » | |||
Returns the sum of two coordinates as a new goog.math.Coordinate.
Arguments:
Returns:
A Coordinate representing the sum of the two coordinates.
|
code » |