/// <summary> /// Initializes a new instance of the GRaff.IntRectangle class at the specified location and with the specified size. /// </summary> /// <param name="location">The location of the top-left corner.</param> /// <param name="size">The size of the rectangle.</param> public IntRectangle(IntVector location, IntVector size) : this(location.X, location.Y, size.X, size.Y) { }
public bool Contains(IntVector pt) => ((Width >= 0 && pt.X >= this.Left && pt.X < this.Right) || (Width <0 && pt.X> this.Right && pt.X <= this.Left)) && ((Height >= 0 && pt.Y >= this.Top && pt.Y < this.Bottom) || (Height <0 && pt.Y> this.Bottom && pt.Y <= this.Top));