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

ScaleTest4() private method

private ScaleTest4 ( ) : void
return void
        public void ScaleTest4()
        {
            float fromMin = 0f;
            float fromMax = 1f;
            float toMin = 0f;
            float toMax = 100f;
            float[] x = { 0.2f, 0.34f };

            float[] actual = Tools.Scale(fromMin, fromMax, toMin, toMax, x);
            Assert.AreEqual(20.0, actual[0]);
            Assert.AreEqual(34.0, actual[1]);

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