/// <summary> /// Initializes a new instance of the <see cref="CDRect"/> struct. /// </summary> /// <param name="location">Location vector (X,Y).</param> /// <param name="size">Size vector. (Width,Height)</param> public CDRect(CDVector2 location, CDVector2 size) { X = location.X; Y = location.Y; Width = size.X; Height = size.Y; }
/// <summary> /// Increases the size of the rectangle by the given vector (width,height). /// </summary> /// <param name="size">The w,h vector.</param> public void Inflate(CDVector2 size) { Inflate(size.X, size.Y); }
/// <summary> /// Returns true if the specified vector coordinate appears inside the rectangle. /// </summary> /// <param name="xy">The x,y vector.</param> public bool Contains(CDVector2 xy) { return(Contains(xy.X, xy.Y)); }