Triangle2DTests Equals Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Shapes.Tests
Assembly: DeltaEngine.Rendering2D.Shapes.Tests (in DeltaEngine.Rendering2D.Shapes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void Equals()
Examples

[Test]
public void Equals()
{
    var triangle1 = new Triangle2D(new Vector2D(1, 2), new Vector2D(3, 4), new Vector2D(5, 6));
    var triangle2 = new Triangle2D(new Vector2D(11, 12), new Vector2D(13, 14),
        new Vector2D(15, 16));
    Assert.AreNotEqual(triangle1, triangle2);
    Assert.AreEqual(triangle1,
        new Triangle2D(new Vector2D(1, 2), new Vector2D(3, 4), new Vector2D(5, 6)));
    Assert.IsTrue(triangle1 ==
        new Triangle2D(new Vector2D(1, 2), new Vector2D(3, 4), new Vector2D(5, 6)));
    Assert.IsTrue(triangle1 != triangle2);
    Assert.IsFalse(triangle1.Equals(triangle2));
    Assert.IsTrue(triangle1.Equals(triangle1));
}
See Also