mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
21 lines
584 B
C#
21 lines
584 B
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
|
|
|
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));
|
|
}
|
|
}
|
|
}
|