private void PushInterval() { if (_currentIntervalSpeed == null) { return; } _prevSpeed = Approximate(_prevSpeed, _currentIntervalSpeed.Speed); _speedSum += _prevSpeed; History.Add(_currentIntervalSpeed); _currentIntervalSpeed = null; }
private void NewInterval(DateTime time) { _currentIntervalSpeed = new IntervalSpeed(time, 0); }