Accord.Tests.Math.AForgeToolsTest.ScaleTest1 C# (CSharp) Method

ScaleTest1() private method

private ScaleTest1 ( ) : void
return void
        public void ScaleTest1()
        {
            double fromMin = 0;
            double fromMax = 1;
            double toMin = 0;
            double toMax = 100;
            double x = 0.2;

            double actual = Tools.Scale(fromMin, fromMax, toMin, toMax, x);
            Assert.AreEqual(20.0, actual);

            float actualF = Tools.Scale((float)fromMin, (float)fromMax, (float)toMin, (float)toMax, (float)x);
            Assert.AreEqual(20f, actualF);
        }