ColorTests Lerp Method Delta Engine Documentation

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

public void Lerp()
Examples

[Test]
public void Lerp()
{
    var color1 = new Color(10, 20, 30, 40);
    var color2 = new Color(20, 30, 40, 50);
    var lerp20 = new Color(12, 22, 32, 42);
    Assert.AreEqual(lerp20, color1.Lerp(color2, 0.2f));
    Assert.AreEqual(color1, color1.Lerp(color2, 0.0f));
    Assert.AreEqual(color2, color1.Lerp(color2, 1.0f));
}
See Also