diff --git a/src/Math/RectangularMatrix.h b/src/Math/RectangularMatrix.h index e9b7beded..0c5d91bb0 100644 --- a/src/Math/RectangularMatrix.h +++ b/src/Math/RectangularMatrix.h @@ -388,10 +388,10 @@ template class RectangularMatrix { Same as RectangularMatrix::operator*(U) const. */ -#ifndef DOXYGEN_GENERATING_OUTPUT -template inline typename std::enable_if::value, RectangularMatrix>::type operator*(U number, const RectangularMatrix& matrix) { -#else +#ifdef DOXYGEN_GENERATING_OUTPUT template inline RectangularMatrix operator*(U number, const RectangularMatrix& matrix) { +#else +template inline typename std::enable_if::value, RectangularMatrix>::type operator*(U number, const RectangularMatrix& matrix) { #endif return matrix*number; } @@ -402,12 +402,12 @@ template inline Rectangula @f[ \boldsymbol B_{ji} = \frac a {\boldsymbol A_{ji}} @f] -@see RectangularMatrix::operator/() +@see RectangularMatrix::operator/(U) const */ -#ifndef DOXYGEN_GENERATING_OUTPUT -template typename std::enable_if::value, RectangularMatrix>::type operator/(U number, const RectangularMatrix& matrix) { -#else +#ifdef DOXYGEN_GENERATING_OUTPUT template RectangularMatrix operator/(U number, const RectangularMatrix& matrix) { +#else +template typename std::enable_if::value, RectangularMatrix>::type operator/(U number, const RectangularMatrix& matrix) { #endif RectangularMatrix out; diff --git a/src/Math/Vector.h b/src/Math/Vector.h index d7b1b6d78..b2581d3f3 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -41,7 +41,7 @@ template class Vector: public RectangularMatrix<1, si * @brief Dot product * * @f[ - * a \cdot b = \sum_{i=0}^{n-1} a_ib_i + * \boldsymbol a \cdot \boldsymbol b = \sum_{i=0}^{n-1} \boldsymbol a_i \boldsymbol b_i * @f] * @see dot() const */ @@ -58,7 +58,7 @@ template class Vector: public RectangularMatrix<1, si * @brief Angle between normalized vectors (in radians) * * Expects that both vectors are normalized. @f[ - * \theta = acos \left( \frac{a \cdot b}{|a| \cdot |b|} \right) + * \theta = acos \left( \frac{\boldsymbol a \cdot \boldsymbol b}{|\boldsymbol a| \cdot |\boldsymbol b|} \right) = acos (\boldsymbol a \cdot \boldsymbol b) * @f] */ inline static T angle(const Vector& normalizedA, const Vector& normalizedB) { @@ -74,7 +74,7 @@ template class Vector: public RectangularMatrix<1, si * @param t Interpolation phase (from range @f$ [0; 1] @f$) * * The interpolation is done as in following: @f[ - * v_{LERP} = (1 - t) \boldsymbol v_A + t \boldsymbol v_B + * \boldsymbol v_{LERP} = (1 - t) \boldsymbol v_A + t \boldsymbol v_B * @f] * @todo http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ * (when SIMD is in place) @@ -83,22 +83,19 @@ template class Vector: public RectangularMatrix<1, si return (U(1) - t)*a + t*b; } - /** @brief Default constructor */ + /** @brief Construct zero-filled vector */ inline constexpr /*implicit*/ Vector() {} /** @todo Creating Vector from combination of vector and scalar types */ /** - * @brief Initializer-list constructor + * @brief Construct vector from values * @param first First value * @param next Next values */ template inline constexpr /*implicit*/ Vector(T first, U... next): RectangularMatrix<1, size, T>(first, next...) {} - /** - * @brief Constructor - * @param value Value for all fields - */ + /** @brief Construct vector with one value for all fields */ #ifdef DOXYGEN_GENERATING_OUTPUT inline explicit Vector(T value) { #else @@ -183,7 +180,7 @@ template class Vector: public RectangularMatrix<1, si * @see operator*=(const Vector&) */ template inline Vector operator*(const Vector& other) const { - return Vector(*this)*=other; + return Vector(*this) *= other; } /** @@ -206,7 +203,7 @@ template class Vector: public RectangularMatrix<1, si * @see operator/=(const Vector&) */ template inline Vector operator/(const Vector& other) const { - return Vector(*this)/=other; + return Vector(*this) /= other; } /** @@ -214,7 +211,7 @@ template class Vector: public RectangularMatrix<1, si * * Should be used instead of length() for comparing vector length with * other values, because it doesn't compute the square root. @f[ - * a \cdot a = \sum_{i=0}^{n-1} a_i^2 + * \boldsymbol a \cdot \boldsymbol a = \sum_{i=0}^{n-1} \boldsymbol a_i^2 * @f] * @see dot(const Vector&, const Vector&) */ @@ -226,7 +223,7 @@ template class Vector: public RectangularMatrix<1, si * @brief %Vector length * * @f[ - * |a| = \sqrt{a \cdot a} + * |\boldsymbol a| = \sqrt{\boldsymbol a \cdot \boldsymbol a} * @f] * @see dot() const */