Example #1
0
        private IEnumerable <Segment> ExpandTheBitsRender(RenderContext context, int maxWidth)
        {
            var bits       = BitAverage.Average(_bits, maxWidth * 8);
            var segmentPos = 0;

            decimal[] segment = new decimal[8];
            foreach (var bit in bits)
            {
                segment[segmentPos] = bit;
                segmentPos++;

                if (segmentPos == 8)
                {
                    yield return(RenderChunk(segment, context.LegacyConsole));

                    segmentPos = 0;
                }
            }
        }
 public IEnumerable <decimal> Smush(int desiredLength)
 {
     return(BitAverage.Average(Bits, desiredLength));
 }