Method ProjectToRectangle
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToRectangle(GeoRectangle2, GeoPoint2)
Projects a point onto the boundary of a rotated rectangle (GeoRectangle2 OBB). The result always lies on one of the four edges, including for points inside the rectangle.
public static GeoPoint2 ProjectToRectangle(GeoRectangle2 rect, GeoPoint2 point)
Parameters
rectGeoRectangle2The rectangle.
pointGeoPoint2The target point.
Returns
- GeoPoint2
The closest point on the rectangle boundary.