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