Esempio n. 1
0
        private static void AddRencoBricks(List <RencoBrick> rencoBricks, int i,
                                           int delta, double rencoSizeAbs, double startLevel)
        {
            var sign = Math.Sign(delta);

            for (var nBrick = 0; nBrick < Math.Abs(delta); nBrick++)
            {
                var brick = new RencoBrick
                {
                    open  = startLevel + nBrick * rencoSizeAbs * sign,
                    close = startLevel + (nBrick + 1) * rencoSizeAbs * sign,
                    index = i
                };
                rencoBricks.Add(brick);
            }
        }
Esempio n. 2
0
 private static void AddRencoBricks(List<RencoBrick> rencoBricks, int i,
    int delta, double rencoSizeAbs, double startLevel)
 {
     var sign = Math.Sign(delta);
     for (var nBrick = 0; nBrick < Math.Abs(delta); nBrick++)
     {
         var brick = new RencoBrick
         {
             open = startLevel + nBrick * rencoSizeAbs * sign,
             close = startLevel + (nBrick + 1) * rencoSizeAbs * sign,
             index = i
         };
         rencoBricks.Add(brick);
     }
 }