Exemplo n.º 1
0
        public void IsInsideTests()
        {
            var square = new Square(2, 2, 2);

            var pointIn = new Point(1, 1);
            var pointOn = new Point(3, 2);
            var pointOut = new Point(3, 4);

            Assert.IsTrue(square.IsInside(pointIn));
            Assert.IsTrue(square.IsInside(pointOn));
            Assert.IsFalse(square.IsInside(pointOut));
        }
Exemplo n.º 2
0
 public static bool IsInside(int pointX, int pointY, Square square)
 {
     return square.IsInside(new Point(pointX, pointY));
 }