Show TOC

@DISTANCELocate this document in the navigation structure

The DISTANCE function takes four decimal parameters that represent two points on a Cartesian plane and returns the length between them as a decimal value; for example: DISTANCE(1.0, 1.0, 2.0, 2.0) returns 2.236.

When working with GPS location values, this function should not be used. See the System functions GPS_LOCATION, LATITUDE, LONGITUDE, DISTANCE_MILES, DISTANCE_KILOMETERS, LOCATION, and IS_VALID_LOCATION.

Parameters
    @DISTANCE (x1, y1, x2, y2)
  • x1 Required decimal number parameter; contains the x coordinate of the first position.
  • y1 Required decimal number parameter; contains the y coordinate of the first position.
  • x2 Required decimal number parameter; contains the x coordinate of the second position.
  • y2 Required decimal number parameter; contains the y coordinate of the second position.
Supported Return Types

Decimal Number