Click or drag to resize
RectangleICalculateClosestPoint Method (Vector2I)
Calculates the point closest to the specified position on the border of this rectangle. If this rectangle contains the specified position, the position is returned instead.

Namespace: Slash.Math.Geometry.Rectangles
Assembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntax
public Vector2I CalculateClosestPoint(
	Vector2I position
)

Parameters

position
Type: Slash.Math.Algebra.VectorsVector2I
Position to calculate the closest border point for.

Return Value

Type: Vector2I
Closest point to the specified position on the border of this rectangle, if this rectangle doesn't contain that position, and the position otherwise.
See Also