From 9d9517c824780016aaca62e333f4cf85019cfeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Nov 2012 01:04:27 +0100 Subject: [PATCH] Vector::angle(): reflect normalization requirement in parameter names. Will be more intuitive when IDE autocompletion kicks in. --- src/Math/Vector.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Math/Vector.h b/src/Math/Vector.h index 5beb7e22c..57f2509d6 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -61,10 +61,10 @@ template class Vector: public RectangularMatrix<1, si * @attention Assertion fails on non-normalized vectors and NaN is * returned. */ - inline static T angle(const Vector& a, const Vector& b) { - CORRADE_ASSERT(MathTypeTraits::equals(a.dot(), T(1)) && MathTypeTraits::equals(b.dot(), T(1)), + inline static T angle(const Vector& normalizedA, const Vector& normalizedB) { + CORRADE_ASSERT(MathTypeTraits::equals(normalizedA.dot(), T(1)) && MathTypeTraits::equals(normalizedB.dot(), T(1)), "Math::Vector::angle(): vectors must be normalized", std::numeric_limits::quiet_NaN()); - return std::acos(dot(a, b)); + return std::acos(dot(normalizedA, normalizedB)); } /** @brief Default constructor */