goog.math.Coordinate3
Classgoog.math.Coordinate3(opt_x, opt_y, opt_z)
Class for representing coordinates and positions in 3 dimensions.
opt_x
{number
=}
opt_y
{number
=}
opt_z
{number
=}
.clone()
Returns a new copy of the coordinate.
goog.math.Coordinate3
}
.difference(a, b)
Returns the difference between two coordinates as a new goog.math.Coordinate3.
a
{goog.math.Coordinate3
}
b
{goog.math.Coordinate3
}
goog.math.Coordinate3
}
.distance(a, b)
Returns the distance between two coordinates.
a
{goog.math.Coordinate3
}
b
{goog.math.Coordinate3
}
number
}
.equals(a, b)
Compares coordinates for equality.
a
{goog.math.Coordinate3
}
b
{goog.math.Coordinate3
}
boolean
}
.fromArray(a)
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.
a
{Array
.<number
>}
goog.math.Coordinate3
}
.squaredDistance(a, b)
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.)
a
{goog.math.Coordinate3
}
b
{goog.math.Coordinate3
}
number
}
.toArray()
Returns the contents of this coordinate as a 3 value Array.
Array
.<number
>}
.toString()
Returns a nice string representing the coordinate.
string
}
.x
{number
}X-value
.y
{number
}Y-value
.z
{number
}Z-value