/** * @param string $key Object key to move */ protected function runFastSmoothingForKey($key) { $started = false; while (!$this->Loop->isAtEnd()) { $this->Loop->move($key, $this->StepSize); $dist = $this->Loop->difference(Trackdata\Object::DISTANCE); $pace = $dist > 0 ? round($this->Loop->difference(Trackdata\Object::TIME) / $dist) : 0; if ($this->KeepArraySize) { $steps = $this->Loop->currentStepSize(); if (!$started) { $steps += 1; $started = true; } for ($i = 0; $i < $steps; ++$i) { $this->Smoothed[] = $pace; } } else { $this->Smoothed[] = $pace; } } }