using System; using System.Utility; using NUnit.Framework; namespace Chernobyl.Mathematics.Utility { [TestFixture, Description("Tests for the Functions type")] public class FunctionsTests { [Test, Description(".Lerp produces correct values.")] public void LerpTest() { var actual = new[] { 10.0.Lerp(20.0, 0.0), 10.0.Lerp(20.0, 0.2), 10.0.Lerp(20.0, 0.4), 10.0.Lerp(20.0, 0.6), 10.0.Lerp(20.0, 0.8), 10.0.Lerp(20.0, 1.0), 10.0.Lerp(20.0, 1.2), 10.0.Lerp(20.0, 1.4), 10.0.Lerp(20.0, 1.6), }; actual.IsEqualTo(new[] { 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0, 26.0 }, "Lerp Results"); } } }