MegaMan.Common.Geometry.RectangleF.Union C# (CSharp) Method

Union() public static method

public static Union ( RectangleF a, RectangleF b ) : RectangleF
a RectangleF
b RectangleF
return RectangleF
        public static RectangleF Union(RectangleF a, RectangleF b)
        {
            float num = Math.Min(a.X, b.X);
            float num2 = Math.Max(a.X + a.Width, b.X + b.Width);
            float num3 = Math.Min(a.Y, b.Y);
            float num4 = Math.Max(a.Y + a.Height, b.Y + b.Height);
            return new RectangleF(num, num3, num2 - num, num4 - num3);
        }