RangeTests GetInterpolation 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 GetInterpolation()
Examples

[Test]
public void GetInterpolation()
{
    var rangeLeft = new Range<Vector3D>(Vector3D.Zero, Vector3D.One);
    var rangeRight = new Range<Vector3D>(Vector3D.One, Vector3D.One * 3);
    var interpolation = rangeLeft.Lerp(rangeRight, 0.5f);
    var expectedInterpolation = new Range<Vector3D>(Vector3D.One * 0.5f, Vector3D.One * 2);
    Assert.AreEqual(expectedInterpolation.Start, interpolation.Start);
    Assert.AreEqual(expectedInterpolation.End, interpolation.End);
}
See Also