Triangle2DTests Corner2 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 Corner2()
Examples

[Test]
public void DefaultConstructor()
{
    var triangle = new Triangle2D();
    Assert.AreEqual(Vector2D.Zero, triangle.Corner1);
    Assert.AreEqual(Vector2D.Zero, triangle.Corner2);
    Assert.AreEqual(Vector2D.Zero, triangle.Corner3);
    Assert.AreEqual(triangle, Triangle2D.Zero);
}
[Test]
public void Constructor()
{
    var triangle = new Triangle2D(new Vector2D(1, 2), new Vector2D(3, 4), new Vector2D(5, 6));
    Assert.AreEqual(new Vector2D(1, 2), triangle.Corner1);
    Assert.AreEqual(new Vector2D(3, 4), triangle.Corner2);
    Assert.AreEqual(new Vector2D(5, 6), triangle.Corner3);
}
[Test]
public void Corner2()
{
    var triangle = new Triangle2D { Corner2 = Vector2D.Half };
    Assert.AreEqual(Vector2D.Half, triangle.Corner2);
}
See Also