Beispiel #1
0
            public void ZeroSimplexNotEquals()
            {
                var simplexA = new Simplex2D(Vector2.Zero);
                var simplexB = new Simplex2D(Vector2.One);

                simplexA.Equals(simplexB).Should().BeFalse();

                var simplexC = new Simplex2D(Vector2.Zero, Vector2.One);

                simplexA.Equals(simplexC).Should().BeFalse();
            }
Beispiel #2
0
            public void TwoSimplexNotEquals()
            {
                var simplexA = new Simplex2D(Vector2.One, Vector2.UnitY, Vector2.UnitX);
                var simplexB = new Simplex2D(Vector2.One, Vector2.Zero, Vector2.UnitX);

                simplexA.Equals(simplexB).Should().BeFalse();

                var simplexC = new Simplex2D(Vector2.One, Vector2.Zero, Vector2.UnitX);
                var simplexD = new Simplex2D(Vector2.Zero, Vector2.UnitY, Vector2.UnitX);

                simplexC.Equals(simplexD).Should().BeFalse();

                var simplexE = new Simplex2D(Vector2.Zero);

                simplexA.Equals(simplexE).Should().BeFalse();
            }
Beispiel #3
0
            public void ZeroSimplexEquals()
            {
                var simplexA = new Simplex2D(Vector2.One);
                var simplexB = new Simplex2D(Vector2.One);

                simplexA.Equals(simplexB).Should().BeTrue();
            }
Beispiel #4
0
            public void OneSimplexEquals()
            {
                var simplexA = new Simplex2D(Vector2.One, Vector2.Zero);
                var simplexB = new Simplex2D(Vector2.One, Vector2.Zero);

                simplexA.Equals(simplexB).Should().BeTrue();

                var simplexC = new Simplex2D(Vector2.One, Vector2.Zero);
                var simplexD = new Simplex2D(Vector2.Zero, Vector2.One);

                simplexC.Equals(simplexD).Should().BeTrue();
            }
Beispiel #5
0
            public void TwoSimplexEquals()
            {
                var simplexA = new Simplex2D(Vector2.One, Vector2.Zero, Vector2.UnitX);

                var simplexB = new Simplex2D(Vector2.One, Vector2.Zero, Vector2.UnitX);

                simplexA.Equals(simplexB).Should().BeTrue();

                var simplexC = new Simplex2D(Vector2.Zero, Vector2.One, Vector2.UnitX);

                simplexA.Equals(simplexC).Should().BeTrue();

                var simplexD = new Simplex2D(Vector2.UnitX, Vector2.Zero, Vector2.One);

                simplexA.Equals(simplexD).Should().BeTrue();

                var simplexE = new Simplex2D(Vector2.One, Vector2.UnitX, Vector2.Zero);

                simplexA.Equals(simplexE).Should().BeTrue();

                var simplexF = new Simplex2D(Vector2.Zero, Vector2.UnitX, Vector2.One);

                simplexA.Equals(simplexF).Should().BeTrue();
            }