PointExtensions Class
Provides extension methods for the type Point.
public static class PointExtensions
- Inheritance:
- Object Object
Methods
GetDegreeAngle(Point, Point)
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
GetRadiusPointAtRotation(Point, Double, Double)
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
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.