VertexFormatTests LerpPositionColor3D Method Delta Engine Documentation

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

public void LerpPositionColor3D()
Examples

[Test]
public void LerpPositionColor3D()
{
    var vertex = new VertexPosition3DColor(Vector3D.UnitX, Color.White);
    var vertex2 = new VertexPosition3DColor(Vector2D.UnitY, Color.Black);
    var lerpedVertex = vertex.Lerp(vertex2, 0.5f);
    Assert.AreEqual(lerpedVertex.Position, new Vector3D(0.5f, 0.5f, 0f));
    Assert.AreEqual(lerpedVertex.Color, new Color(127, 127, 127));
}
See Also