distance method

double distance(
  1. Coordinate3 b
)

Returns the distance between two coordinates.

@param {goog.math.Coordinate3} b A Coordinate3. @return {number} The distance between {@code a} and {@code b}.

Implementation

double distance(Coordinate3 b)
{
  double dx = this.x - b.x;
  double dy = this.y - b.y;
  double dz = this.z - b.z;
  return Math.sqrt(dx * dx + dy * dy + dz * dz);
}