コード例 #1
0
        public void TestClampedCubicSplineInterpolation()
        {
            Random r = new Random(Environment.TickCount);

            TearDown();
            var interpolation = new CubicSplineInterpolation();

            interpolation.Initialize(_times, _rates);
            for (int i = 0; i < 10; ++i)
            {
                double time       = (i + r.Next(-10000, 10000) / 10000);
                double interpRate = interpolation.ValueAt(time, true);
                Debug.WriteLine($"interpolatedRate : {interpRate} Time: {time}");
            }
        }