/// <summary> /// Calculates whether this box contains another box /// </summary> /// <param name="other">The box.</param> /// <returns>True if this box contains the given box; False otherwise.</returns> /// <remarks>This does consider a box that touches the edge contained.</remarks> public bool Contains(Box2D <T> other) => Scalar.GreaterThanOrEqual(other.Min.X, Min.X) && Scalar.GreaterThanOrEqual(other.Min.Y, Min.Y) && Scalar.LessThanOrEqual(other.Max.X, Max.X) && Scalar.LessThanOrEqual(other.Max.Y, Max.Y);
/// <summary>Returns a boolean indicating whether the given Box2D is equal to this Box2D instance.</summary> /// <param name="other">The Box2D to compare this instance to.</param> /// <returns>True if the other Box2D is equal to this instance; False otherwise.</returns> public bool Equals(Box2D <T> other) { return(Min.Equals(other.Min) && Max.Equals(other.Max)); }