Scalar. Returns a value representing the distance between two points in two or three dimensions.
distance ( point1x, point1y, [point1z], point2x, point2y, [point2z] )
point1x | An expression that evaluates to a value representing the position of the first point on the x axis. |
point1y | An expression that evaluates to a value representing the position of the first point on the y axis. |
point1z | An expression that evaluates to a value representing the position of the first point on the z axis. |
point2x | An expression that evaluates to a value representing the position of the second point on the x axis. |
point2y | An expression that evaluates to a value representing the position of the second point on the y axis. |
point2z | An expression that evaluates to a value representing the position of the second point on the z axis. |
Returns a number representing the distance between two points in either two or three dimensions. All arguments must be the same numeric type, and the function returns the same datatype.
distance (7.5, 6.5, 10.5, 10.5)returns 5.0.
distance ( 1.2, 3.4, 5.6, 7.8, 9.10, 11.12 ) returns 10.320872.