 | 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.RectanglesAssembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntaxpublic Vector2F CalculateClosestPoint(
Vector2F position,
Vector2F threshold
)
Public Function CalculateClosestPoint (
position As Vector2F,
threshold As Vector2F
) As Vector2F
public:
Vector2F CalculateClosestPoint(
Vector2F position,
Vector2F threshold
)
member CalculateClosestPoint :
position : Vector2F *
threshold : Vector2F -> Vector2F
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