Ejemplo n.º 1
0
        private void CalcMinMaxAvg(UlBlockList <float> blockList, int from, int to, out float min, out float max, out float avg)
        {
            float value, total = 0;

            min = float.MaxValue;
            max = float.MinValue;

            if (from > to)
            {
                int nTemp = to;
                to   = from;
                from = nTemp;
            }

            for (int i = from; i <= to; i++)
            {
                value  = blockList[i];
                total += value;

                if (value < min)
                {
                    min = value;
                }
                if (value > max)
                {
                    max = value;
                }
            }

            avg = total / (to - from + 1);
        }
Ejemplo n.º 2
0
        public UlDoubleBufferedSeries(string name, Color color, int length = 600)
        {
            BaseSeries = new Series(name, ViewType.SwiftPlot);

            BaseSeries.ArgumentScaleType = ScaleType.Numerical;
            BaseSeries.ValueScaleType    = ScaleType.Numerical;
            ((SwiftPlotSeriesView)BaseSeries.View).Color = color;

            Points = new UlBlockList <float>(length);
        }