In This Article

PointExtensions Class

Provides extension methods for the type Point.

public static class PointExtensions
Inheritance:
Object Object

Methods

GetDegreeAngle(Point, Point)

Returns the degree angle between a center Point and another Point location.

public static double GetDegreeAngle(this Point centerPosition, Point position)
Parameter Type Description
centerPosition Point

The center Point.

position Point

The Point location to examine.

Returns

Double:

The degree angle between a center Point and another Point location.

GetRadiusPointAtRotation(Point, Double, Double)

Returns the Point location relative to a center Point for a degree angle at the specified radius.

public static Point GetRadiusPointAtRotation(this Point centerPosition, double angle, double radius)
Parameter Type Description
centerPosition Point

The center Point.

angle Double

The angle, in degrees (0 - 359.99).

radius Double

The radius.

Returns

Point:

The Point location for a degree angle at the specified radius.

IsEffectivelyEqual(Point, Point)

Determines whether the two values are close enough to be considered equal.

public static bool IsEffectivelyEqual(this Point left, Point right)
Parameter Type Description
left Point

The value on the left side of the comparison.

right Point

The value on the left side of the comparison.

Returns

Boolean:

true if the two values are close enough to be considered equal; otherwise, false.

IsWithin(Point, Point, Double)

Determines whether the two values are within a specified range.

public static bool IsWithin(this Point left, Point right, double difference)
Parameter Type Description
left Point

The value on the left side of the comparison.

right Point

The value on the left side of the comparison.

difference Double

The difference threshold.

Returns

Boolean:

true if the two values within a specified range; otherwise, false.

Midpoint(Point, Point)

Gets the mid-point between the specified points.

public static Point Midpoint(this Point point, Point otherPoint)
Parameter Type Description
point Point

The first point.

otherPoint Point

The second point.

Returns

Point:

The mid-point between the specified points.

Inherited Members