distancesquared()

Scalar. Returns a number representing the square of the distance between two points in either two or three dimensions.

Syntax

distancesquared ( point1x, point1y, [point1z], point2x, point2y, [point2z] )

Parameters

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.

Usage

Returns a number representing the square of the distance between two points in either two or three dimensions. All arguments must be of the same numeric type, and the function returns the same datatype.

Example

distancesquared (7.5, 6.5, 10.5, 10.5)returns 25.0.

distancesquared ( 1.2, 3.4, 5.6, 7.8, 9.10, 11.12 ) returns 106.502400.