Class for representing coordinates and positions.
| Instance Method Summary | |
clone() ⇒ !goog.math.CoordinateReturns a new copy of the coordinate. | |
toString() ⇒ stringReturns a nice string representing the coordinate. | |
| Static Method Summary | |
difference(!goog.math.Coordinate a, !goog.math.Coordinate b) ⇒ !goog.math.CoordinateReturns the difference between two coordinates as a new goog.math.Coordinate. | |
distance(!goog.math.Coordinate a, !goog.math.Coordinate b) ⇒ numberReturns the distance between two coordinates. | |
equals(?goog.math.Coordinate a, ?goog.math.Coordinate b) ⇒ booleanCompares coordinates for equality. | |
squaredDistance(!goog.math.Coordinate a, !goog.math.Coordinate b) ⇒ numberReturns 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.) | |
sum(!goog.math.Coordinate a, !goog.math.Coordinate b) ⇒ !goog.math.CoordinateReturns the sum of two coordinates as a new goog.math.Coordinate. | |