Triangle2D Equals Method (Triangle2D)Delta Engine Documentation

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

public bool Equals(
	Triangle2D other
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.Rendering2D.Shapes.Tests.Triangle2DTests
Examples

1 unit tests call DeltaEngine.Rendering2D.Shapes.Triangle2D.Equals(DeltaEngine.Rendering2D.Shapes.Triangle2D)
[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