Method DistanceTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
DistanceTo(GeoPoint3)
Calculates the shortest distance from this disc to a point.
public double DistanceTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
- double
Nought only where the point lies in the disc, otherwise the gap to it, measured exactly.
Remarks
The disc counts as a filled surface, as a circle's does, so a point 50 above the centre of an ellipse 300 by 100 is 50 from it, measured straight down to the surface rather than out to the rim; a point beyond the rim is measured to the nearest point of the rim.
DistanceTo(GeoSphere3)
Calculates the shortest distance from this ellipse to a ball, using the default tolerance.
public double DistanceTo(GeoSphere3 sphere)
Parameters
sphereGeoSphere3
Returns
- double
Nought where the ellipse reaches the ball, otherwise the gap, measured exactly.
DistanceTo(GeoSphere3, Tolerance)
Calculates the shortest distance from this ellipse to a ball, within a tolerance.
public double DistanceTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- double
Nought where the ellipse reaches the ball, otherwise the gap, measured exactly.
DistanceTo(GeoSpline3)
Calculates the shortest distance from this ellipse to a spline, using the default tolerance.
public double DistanceTo(GeoSpline3 spline)
Parameters
splineGeoSpline3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
DistanceTo(GeoSpline3, Tolerance)
Calculates the shortest distance from this ellipse to a spline, within a tolerance.
public double DistanceTo(GeoSpline3 spline, Tolerance tolerance)
Parameters
splineGeoSpline3toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly; the tolerance is not read.
Exceptions
- ArgumentNullException
Thrown when the spline is null.