Files
osu-framework/osu.Framework.Tests/MathUtils/TestInterpolation.cs
2019-01-24 17:59:35 +09:00

21 lines
573 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.MathUtils;
namespace osu.Framework.Tests.MathUtils
{
[TestFixture]
public class TestInterpolation
{
[Test]
public void TestLerp()
{
Assert.AreEqual(5, Interpolation.Lerp(0, 10, 0.5f));
Assert.AreEqual(0, Interpolation.Lerp(0, 10, 0));
Assert.AreEqual(10, Interpolation.Lerp(0, 10, 1));
}
}
}