Finds the distance of a specified point from the line segment and the closest point on the segment to the specified point.

Namespace: Lucene.Net.Spatial.Geometry.Shape
Assembly: Lucene.Net.Contrib.Spatial (in Lucene.Net.Contrib.Spatial.dll) Version: 2.9.1.2 (2.9.1.002)

Syntax

C#
public double Distance(
	Point2D p,
	Point2D closestPt
)
Visual Basic
Public Function Distance ( _
	p As Point2D, _
	closestPt As Point2D _
) As Double
Visual C++
public:
double Distance(
	Point2D^ p, 
	Point2D^ closestPt
)

Parameters

p
Type: Lucene.Net.Spatial.Geometry.Shape..::..Point2D
The test point.
closestPt
Type: Lucene.Net.Spatial.Geometry.Shape..::..Point2D
Closest point on the segment to c.

Return Value

Returns the distance from p to the closest point on the segment.

See Also