Home > Working with SGWorld > CoordServices (ICoordServices6) > GetDistance
The method returns the horizontal distance between two given coordinates.
JavaScript |
|
GetDistance(X1, Y1, X2, Y2) |
C# |
|
double GetDistance( double X1, double Y1, double X2, double Y2) |
C++ |
|
HRESULT GetDistance( double X1, double Y1, double X2, double Y2, double * Dist) |
Parameters
X1
X-coordinate of the first point in coordinate system units.
Y1
Y-coordinate of the first point in coordinate system units.
X2
X-coordinate of the second point in coordinate system units.
Y2
Y-coordinate of the second point in coordinate system units.
Return Value
Dist
The calculated distance between the two points.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.