Click or drag to resize
RectangleICalculateClosestPoint Method (Vector2F, Vector2F)
Calculates the point closest to the specified position on the border of this rectangle with width threshold. 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 Vector2F CalculateClosestPoint(
	Vector2F position,
	Vector2F threshold
)

Parameters

position
Type: Slash.Math.Algebra.VectorsVector2F
Position to calculate the closest border point for.
threshold
Type: Slash.Math.Algebra.VectorsVector2F
Thickness of the rectangle border.

Return Value

Type: Vector2F
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