◆ ClipToRect()

static Vector2 ClipToRect ( this Rect  rectToClipTo,
Vector2  pointToClip 
)
static
Parameters
rectToClipToRect to which the point should be clipped within.
pointToCliporiginal Vector2 point to be clipped.
Returns
The resultant clipped point.