Esempio n. 1
0
        public void TestVerticesAreaTriangle()
        {
            KVertices tri = new KVertices
            {
                new KVector2(0, 0),
                new KVector2(1, 1),
                new KVector2(2, 0)
            };

            Assert.AreEqual(1f, tri.Area());
        }
Esempio n. 2
0
        public void TestVerticesAreaRect()
        {
            KVertices rect = new KVertices
            {
                new KVector2(0, 1),
                new KVector2(1, 1),
                new KVector2(1, 0),
                new KVector2(0, 0)
            };

            Assert.AreEqual(1f, rect.Area());
        }