From 759a28ef45f3b01de4672698ce797ed9e3b471df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 11 Jul 2013 14:41:42 +0200 Subject: [PATCH] Math: improved documentation for *::isNormalized(). --- src/Math/Complex.h | 2 +- src/Math/DualComplex.h | 1 + src/Math/DualQuaternion.h | 1 + src/Math/Quaternion.h | 2 +- src/Math/Vector.h | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Math/Complex.h b/src/Math/Complex.h index 8e54f03b7..88f2338f7 100644 --- a/src/Math/Complex.h +++ b/src/Math/Complex.h @@ -150,7 +150,7 @@ template class Complex { * @brief Whether the complex number is normalized * * Complex number is normalized if it has unit length: @f[ - * |c|^2 = |c| = 1 + * |c \cdot c - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * @f] * @see dot(), normalized() */ diff --git a/src/Math/DualComplex.h b/src/Math/DualComplex.h index 024563d2f..95ed5e7fb 100644 --- a/src/Math/DualComplex.h +++ b/src/Math/DualComplex.h @@ -133,6 +133,7 @@ template class DualComplex: public Dual> { * |c_0|^2 = |c_0| = 1 * @f] * @see Complex::dot(), normalized() + * @todoc Improve the equation as in Complex::isNormalized() */ bool isNormalized() const { return Implementation::isNormalizedSquared(lengthSquared()); diff --git a/src/Math/DualQuaternion.h b/src/Math/DualQuaternion.h index 6411c9fa7..e3ef06f26 100644 --- a/src/Math/DualQuaternion.h +++ b/src/Math/DualQuaternion.h @@ -139,6 +139,7 @@ template class DualQuaternion: public Dual> { * |\hat q|^2 = |\hat q| = 1 + \epsilon 0 * @f] * @see lengthSquared(), normalized() + * @todoc Improve the equation as in Quaternion::isNormalized() */ bool isNormalized() const { /* Comparing dual part classically, as comparing sqrt() of it would diff --git a/src/Math/Quaternion.h b/src/Math/Quaternion.h index d17c3e627..65c3f9408 100644 --- a/src/Math/Quaternion.h +++ b/src/Math/Quaternion.h @@ -164,7 +164,7 @@ template class Quaternion { * @brief Whether the quaternion is normalized * * Quaternion is normalized if it has unit length: @f[ - * |q|^2 = |q| = 1 + * |q \cdot q - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * @f] * @see dot(), normalized() */ diff --git a/src/Math/Vector.h b/src/Math/Vector.h index 353986936..42aaac41c 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -224,7 +224,7 @@ template class Vector { * @brief Whether the vector is normalized * * The vector is normalized if it has unit length: @f[ - * |\boldsymbol a|^2 = |\boldsymbol a| = 1 + * |\boldsymbol a \cdot \boldsymbol a - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * @f] * @see dot(), normalized() */