diff --git a/src/Magnum/Math/Random.h b/src/Magnum/Math/Random.h index 09d93fcea..8f3c1234f 100644 --- a/src/Magnum/Math/Random.h +++ b/src/Magnum/Math/Random.h @@ -86,9 +86,9 @@ template Quaternion randomRotation() { //http://planning.cs.uiuc.edu/node198.html - auto u{randomScalar()}; - auto v{2 * Math::Constants::pi() * randomScalar()}; - auto w{2 * Math::Constants::pi() * randomScalar()}; + auto u = randomScalar(); + auto v = 2 * Math::Constants::pi() * randomScalar(); + auto w = 2 * Math::Constants::pi() * randomScalar(); return Quaternion({sqrt(1 - u) * std::sin(v), sqrt(1 - u) * std::cos(v), sqrt(u) * std::sin(w)},