public void PointInPolygon(TestPoint location, TestSize size, TestPoint point, bool isInside)
        {
            var shape = Create(location, size);

            Assert.Equal(isInside, shape.PointInPolygon(point));
        }
Example #2
0
        public void PointInPolygon(TestPoint location, TestSize size, TestPoint point, bool isInside)
        {
            RectangularPolygon shape = new RectangularPolygon(location, size);

            Assert.Equal(isInside, shape.Contains(point));
        }
Example #3
0
        public void Distance(TestPoint location, TestSize size, TestPoint point, float expectecDistance)
        {
            IPath shape = new RectangularPolygon(location, size);

            Assert.Equal(expectecDistance, shape.Distance(point).DistanceFromPath);
        }
Example #4
0
        public void Distance(TestPoint location, TestSize size, TestPoint point, float expectecDistance)
        {
            IShape shape = new Rectangle(location, size);

            Assert.Equal(expectecDistance, shape.Distance(point));
        }