ESRI.ArcGIS.Mobile
SquareDistance Method
See Also  Send Feedback
ESRI.ArcGIS.Mobile.Geometries Namespace > Coordinate Class : SquareDistance Method

other
The coordinate to calculate distance from this coordinate.
Calculates the square distance between this coordinate and another coordinate.

Syntax

Visual Basic (Declaration) 
Public Function SquareDistance( _
   ByVal other As Coordinate _
) As Double
C# 
public double SquareDistance( 
   Coordinate other
)

Parameters

other
The coordinate to calculate distance from this coordinate.

Return Value

The square distance between the two coordinates.

Exceptions

ExceptionDescription
ArgumentNullExceptionNull coordinate.

Remarks

Square distance is defined as dx*dx+dy*dy, where dx and dy are the differences in x and y of the two compared coordinates.

This is a more efficient way to compare distance to other geometries because it avoids a square root operation.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also