Namespace: DeltaEngine.Rendering2D.Graphs.Tests
Assembly: DeltaEngine.Rendering2D.Graphs.Tests (in DeltaEngine.Rendering2D.Graphs.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Rendering2D.Graphs.Tests (in DeltaEngine.Rendering2D.Graphs.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void AddThirdPointAtTheStart() { GraphLine line = CreateLineWithTwoPoints(); line.AddPoint(new Vector2D(0.2f, 0.5f)); Assert.AreEqual(3, line.points.Count); Assert.AreEqual(2, line.lines.Count); Line2D line0 = line.lines[0]; Assert.IsTrue(line0.StartPoint.IsNearlyEqual(new Vector2D(0.3857f, 0.5f))); Assert.IsTrue(line0.EndPoint.IsNearlyEqual(new Vector2D(0.462f, 0.5f))); Line2D line1 = line.lines[1]; Assert.IsTrue(line1.StartPoint.IsNearlyEqual(new Vector2D(0.462f, 0.5f))); Assert.IsTrue(line1.EndPoint.IsNearlyEqual(new Vector2D(0.538f, 0.462f))); }
See Also