Пример #1
0
        public Shift(PercentageOffset frontSide, PercentageOffset rearSide, PercentageOffset rightSide, PercentageOffset leftSide)
        {
            FrontSide = frontSide;
            RearSide  = rearSide;
            RightSide = rightSide;
            LeftSide  = leftSide;

            DirOfLargestShift  = Directions.Front;
            PercOfLargestShift = frontSide;

            var shifts = new List <PercentageOffset> {
                rearSide, rightSide, leftSide
            };

            for (var i = 1; i < shifts.Count; i++)
            {
                var s = shifts[i];

                if (s.GreaterThan(PercOfLargestShift))
                {
                    PercOfLargestShift = s;
                    DirOfLargestShift  = (Directions)i;
                }
            }
        }
Пример #2
0
 public bool GreaterThan(PercentageOffset perc)
 {
     return(this.Value > perc.Value);
 }