diff --git a/src/Magnum/Math/Complex.h b/src/Magnum/Math/Complex.h index e701311d7..695409ee3 100644 --- a/src/Magnum/Math/Complex.h +++ b/src/Magnum/Math/Complex.h @@ -79,7 +79,13 @@ template inline Rad angle(const Complex& normalizedA, const Compl @brief Complex number @tparam T Data type -Represents 2D rotation. See @ref transformations for brief introduction. +Represents 2D rotation. Usually denoted as the following in equations, with +@f$ a_0 @f$ being the @ref real() part and @f$ a_i @f$ the @ref imaginary() +part: @f[ + c = a_0 + i a_i +@f] + +See @ref transformations for brief introduction. @see @ref Magnum::Complex, @ref Magnum::Complexd, @ref Matrix3 */ template class Complex { @@ -191,11 +197,11 @@ template class Complex { return Implementation::isNormalizedSquared(dot()); } - /** @brief Real part */ + /** @brief Real part (@f$ a_0 @f$) */ T& real() { return _real; } constexpr T real() const { return _real; } /**< @overload */ - /** @brief Imaginary part */ + /** @brief Imaginary part (@f$ a_i @f$) */ T& imaginary() { return _imaginary; } constexpr T imaginary() const { return _imaginary; } /**< @overload */ diff --git a/src/Magnum/Math/Dual.h b/src/Magnum/Math/Dual.h index 151db9099..2e74a3230 100644 --- a/src/Magnum/Math/Dual.h +++ b/src/Magnum/Math/Dual.h @@ -45,6 +45,11 @@ namespace Implementation { /** @brief Dual number @tparam T Underlying data type + +Usually denoted as the following in equations, with @f$ a_0 @f$ being the +@ref real() part and @f$ a_\epsilon @f$ the @ref dual() part: @f[ + \hat a = a_0 + \epsilon a_\epsilon +@f] */ template class Dual { template friend class Dual; @@ -121,13 +126,13 @@ template class Dual { return !operator==(other); } - /** @brief Real part */ + /** @brief Real part (@f$ a_0 @f$) */ T& real() { return _real; } /* Returning const so it's possible to call constexpr functions on the result. WTF, C++?! */ constexpr const T real() const { return _real; } /**< @overload */ - /** @brief Dual part */ + /** @brief Dual part (@f$ a_\epsilon @f$) */ T& dual() { return _dual; } /* Returning const so it's possible to call constexpr functions on the result. WTF, C++?! */ diff --git a/src/Magnum/Math/DualComplex.h b/src/Magnum/Math/DualComplex.h index 59a7da4b7..58571fa6d 100644 --- a/src/Magnum/Math/DualComplex.h +++ b/src/Magnum/Math/DualComplex.h @@ -43,8 +43,14 @@ namespace Implementation { @brief Dual complex number @tparam T Underlying data type -Represents 2D rotation and translation. See @ref transformations for brief -introduction. +Represents 2D rotation and translation. Usually denoted as the following in +equations, with @f$ q_0 @f$ being the @ref real() part and @f$ q_\epsilon @f$ +the @ref dual() part: @f[ + \hat q = q_0 + \epsilon q_\epsilon +@f] + +See @ref Dual and @ref Complex for further notation description and +@ref transformations for brief introduction. @see @ref Magnum::DualComplex, @ref Magnum::DualComplexd, @ref Dual, @ref Complex, @ref Matrix3 @todo Can this be done similarly as in dual quaternions? It sort of works, but diff --git a/src/Magnum/Math/DualQuaternion.h b/src/Magnum/Math/DualQuaternion.h index 5191b563d..ab806d3a6 100644 --- a/src/Magnum/Math/DualQuaternion.h +++ b/src/Magnum/Math/DualQuaternion.h @@ -179,8 +179,14 @@ template inline DualQuaternion sclerpShortestPath(const DualQuaterni @brief Dual quaternion @tparam T Underlying data type -Represents 3D rotation and translation. See @ref transformations for brief -introduction. +Represents 3D rotation and translation. Usually denoted as the following in +equations, with @f$ q_0 @f$ being the @ref real() part and @f$ q_\epsilon @f$ +the @ref dual() part: @f[ + \hat q = q_0 + \epsilon q_\epsilon +@f] + +See @ref Dual and @ref Quaternion for further notation description and +@ref transformations for a brief introduction. @see @ref Magnum::DualQuaternion, @ref Magnum::DualQuaterniond, @ref Dual, @ref Quaternion, @ref Matrix4 */ diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index 528bbbbea..4196e61fe 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -333,13 +333,13 @@ template class Quaternion { return Implementation::isNormalizedSquared(dot()); } - /** @brief Vector part */ + /** @brief Vector part (@f$ \boldsymbol{q}_V @f$) */ Vector3& vector() { return _vector; } /* Returning const so it's possible to call constexpr functions on the result. WTF, C++?! */ constexpr const Vector3 vector() const { return _vector; } /**< @overload */ - /** @brief Scalar part */ + /** @brief Scalar part (@f$ q_S @f$) */ T& scalar() { return _scalar; } constexpr T scalar() const { return _scalar; } /**< @overload */