public void LShapeVisionTest()
        {
            var poly = VisibilitySimple.Vision(LShape, new Vector2(3.427403f, 3.464213f));

            // check percentage
            Assert.Greater(0.88f, poly.Area / LShape.Area);
        }
        public void AreaTest()
        {
            var vision = VisibilitySimple.Vision(arrowPoly, new Vector2(1.5f, 0));

            Assert.IsTrue(MathUtil.EqualsEps(arrowPoly.Area, vision.Area));

            vision = VisibilitySimple.Vision(diamondPoly, Vector2.zero);
            Assert.IsTrue(MathUtil.EqualsEps(diamondPoly.Area, vision.Area));
        }
 public void ContainsTest()
 {
     // check if exception is thrown when given point outside polygon
     Assert.Throws <ArgumentException>(() => VisibilitySimple.Vision(arrowPoly, new Vector2(-1f, 0)));
 }