GraphLineTests AddThirdPointAtTheEnd Method Delta Engine Documentation

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

public void AddThirdPointAtTheEnd()
Examples

[Test, CloseAfterFirstFrame]
public void AddThirdPointAtTheEnd()
{
    GraphLine line = CreateLineWithTwoPoints();
    line.AddPoint(new Vector2D(0.8f, 0.5f));
    Assert.AreEqual(3, line.points.Count);
    Assert.AreEqual(2, line.lines.Count);
    Line2D line2D = line.lines[1];
    Assert.IsTrue(line2D.StartPoint.IsNearlyEqual(new Vector2D(0.538f, 0.462f)));
    Assert.IsTrue(line2D.EndPoint.IsNearlyEqual(new Vector2D(0.6143f, 0.5f)));
}
See Also