Table of Contents

Class PointExtensions

Namespace
Acuit.Pinpoint.Windows
Assembly
Acuit.Pinpoint.Windows.dll

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

point Point

The point.

other Point

A point.

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

point Point

The point.

rect Rect

A rectangle.

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.