/**
* @param number $slowness
* @return Location|null
*/
public function tick($slowness)
{
if (($length = $this->length * $slowness) < 1.0E-7) {
return null;
}
if (($progress = $this->current++ / $length) > 1) {
return null;
}
return new Location($this->getOrigin()->getX() + $this->distance->getX() * $progress, 1.62 + $this->getOrigin()->getY() + $this->distance->getY() * $progress, $this->getOrigin()->getZ() + $this->distance->getZ() * $progress, $this->getOrigin()->getYaw() + $this->distance->getYaw() * $progress, $this->getOrigin()->getPitch() + $this->distance->getPitch() * $progress);
}