Exemplo n.º 1
0
        public VelocityMap(VelocityMap clone)
        {
            X = new List<double>();
            Y = new List<double>();

            XMin = clone.XMin;
            YMin = clone.YMin;
            XMax = clone.XMax;
            YMax = clone.YMax;

            foreach (var x in clone.X)
                X.Add(x);
            foreach (var y in clone.Y)
                Y.Add(y);
        }
Exemplo n.º 2
0
        public VelocityMap(VelocityMap clone)
        {
            X = new List <double>();
            Y = new List <double>();

            XMin = clone.XMin;
            YMin = clone.YMin;
            XMax = clone.XMax;
            YMax = clone.YMax;

            foreach (var x in clone.X)
            {
                X.Add(x);
            }
            foreach (var y in clone.Y)
            {
                Y.Add(y);
            }
        }
Exemplo n.º 3
0
        public void TestMap()
        {
            int count = 3;
            var map = new VelocityMap(3);

            Assert.AreEqual(0.0, map.GetY(0));
            Assert.AreEqual(1.0 / (count - 1), map.GetY(1));
            Assert.AreEqual(2.0 / (count - 1), map.GetY(2));

            map.SetY(0.20, 0);
            map.SetY(0.80, 0);
            map.SetY(0.95, 0);

            double output = 0.0;
            output = map.Map(-0.1);
            output = map.Map(0.0);
            output = map.Map(0.2);
            output = map.Map(0.4);
            output = map.Map(0.5);
            output = map.Map(0.7);
            output = map.Map(1.0);
            output = map.Map(1.3);
        }