Class PointExtensions
Point class extensions.
public static class PointExtensions
- Inheritance
-
PointExtensions
- Inherited Members
Methods
DistanceTo(Point, Point)
Calculates the distance from the point to another point.
public static double DistanceTo(this Point point, Point other)
Parameters
Returns
- double
The distance between the points.
DistanceTo(Point, Rect)
Calculates the distance from the point to a rectangle.
public static double DistanceTo(this Point point, Rect rect)
Parameters
Returns
- double
The distance to the rectangle.
Remarks
If the point is within the rectangle or along an edge, the distance returned will be zero. Otherwise, the distance returned will be the distance from the point to the closest point along the edge of the rectangle.