Artemis.Engine.Maths.Geometry.RectUtils.Contains C# (CSharp) Method

Contains() public static method

Check if the first rectangle entirely encloses the second rectangle.
public static Contains ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool
x1 double
y1 double
w1 double
h1 double
x2 double
y2 double
w2 double
h2 double
return bool
        public static bool Contains(
            double x1, double y1, double w1, double h1,
            double x2, double y2, double w2, double h2)
        {
            return x1 <= x2 && x1 + w1 >= x2 + w2 &&
                   y1 <= y2 && y1 + h1 >= y2 + h2;
        }