RectExtensions Class Reference

Contains multiple extension functions for use with the Rect class.

Static Public Member Functions

static Rect Encapsulating (this Rect rect, Rect recttoAdd)
 Simple function to expand a rect, if necessary, such that it includes the specified second Rect. The result is provided by modifying the Rect provided, by reference, in the first parameter.
 
static Rect Encapsulating (this Rect rect, Vector2 point)
 Simple function to expand a rect, if necessary, such that it includes the specified point. The result is provided by modifying the rect provided, by reference, in the first parameter.
 
static Rect GetArcRect (float radius, float curveAngle, float startingAngle)
 Basic Geometry function. Given an arc of a specific radius, angle span, and starting angle, this function be compute the total bounding rectangle of the shape. The arc is assumed to be centered at the origin. The total span is greater than a full circle, the resultant rect will bound a single full circle, of the provided radius.