/// <summary> /// Writes the given <see cref="Rectanglei"/> to an <see cref="Ibasa.IO.BinaryWriter">. /// </summary> public static void Write(this Ibasa.IO.BinaryWriter writer, Rectanglei rectangle) { writer.Write(rectangle.X); writer.Write(rectangle.Y); writer.Write(rectangle.Width); writer.Write(rectangle.Height); }
public static bool Contains(Rectanglei rectangle, Point2i point) { return((rectangle.Left <= point.X) && (rectangle.Right >= point.X) && (rectangle.Bottom <= point.Y) && (rectangle.Top >= point.Y)); }
/// <summary> /// Returns a value that indicates whether two rectangles are equal. /// </summary> /// <param name="left">The first rectangle to compare.</param> /// <param name="right">The second rectangle to compare.</param> /// <returns>true if the left and right are equal; otherwise, false.</returns> public static bool Equals(Rectanglei left, Rectanglei right) { return(left == right); }