https://github.com/Hapaxia/SfmlLogoAnimation/blob/master/SfmlLogoAnimation/SfmlLogoAnimation.cpp#L232-L241
void SfmlLogoAnimation::priv_updateShake(const sf::View& startingView)
{
view = startingView;
if ((currentTime >= shakeStart) && (currentTime <= (shakeStart + shakeLength)))
{
const float ratio{ (currentTime - shakeStart) / shakeLength };
const float strength{ shakeStrength * (1.f - ratio) };
view.move({ (static_cast<float>(rand() % 200) / 100.f - 1.f) * strength, (static_cast<float>(rand() % 200) / 100.f - 1.f) * strength });
}
}