public static FilaCalcResult Calculate() { int messurements = _values.Count(); double total = 0.0; foreach (var value in _values) { total += value; } FilaCalcResult result = new FilaCalcResult((float)(total / messurements), messurements); return result; }
public static FilaCalcResult Calculate() { int messurements = _values.Count(); double total = 0.0; foreach (var value in _values) { total += value; } FilaCalcResult result = new FilaCalcResult((float)(total / messurements), messurements); return(result); }
void RefreshDisplay() { FilamentCalculator.FilaCalcResult result = FilamentCalculator.FilaCalc.Calculate(); lbn_currentDiameter.Text = String.Format("{0}mm", result.Averrage); lbn_measurements.Text = result.Messurements.ToString(); }