diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-11 18:39:16 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-11 18:39:16 +0200 |
commit | 1996507fd3d4d9de90de99845b71a6bf3fbe62da (patch) | |
tree | 6dca78a855a8f0eacb3aecd230d337453ebca2ce /src/math/func.h | |
parent | 7f80ca297154809523cd533edf1842ab1ae391aa (diff) | |
download | colobot-1996507fd3d4d9de90de99845b71a6bf3fbe62da.tar.gz colobot-1996507fd3d4d9de90de99845b71a6bf3fbe62da.tar.bz2 colobot-1996507fd3d4d9de90de99845b71a6bf3fbe62da.zip |
Documentation update
- updated Doxyfile
- added/changed file, dir and namespace descriptions
- fixed some errors in doxygen tags
Diffstat (limited to 'src/math/func.h')
-rw-r--r-- | src/math/func.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/math/func.h b/src/math/func.h index e97d990..541b084 100644 --- a/src/math/func.h +++ b/src/math/func.h @@ -15,8 +15,9 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -/** @defgroup MathFuncModule math/func.h - Contains common math functions. +/** + * \file math/func.h + * \brief Common math functions */ #pragma once @@ -31,8 +32,6 @@ namespace Math { -/* @{ */ // start of group - //! Compares \a a and \a b within \a tolerance inline bool IsEqual(float a, float b, float tolerance = Math::TOLERANCE) { @@ -188,11 +187,13 @@ inline float Direction(float a, float g) //! Managing the dead zone of a joystick. /** -\verbatimin: -1 0 1 +\verbatim +in: -1 0 1 --|-------|----o----|-------|--> <----> dead -out: -1 0 0 1\endverbatim */ +out: -1 0 0 1 +\endverbatim */ inline float Neutral(float value, float dead) { if ( fabs(value) <= dead ) @@ -226,7 +227,8 @@ inline float Smooth(float actual, float hope, float time) //! Bounces any movement /** -\verbatimout +\verbatim +out | 1+------o-------o--- | o | o o | | bounce @@ -235,7 +237,8 @@ inline float Smooth(float actual, float hope, float time) | o | | -o------|-------+----> progress 0| | 1 - |<---->|middle\endverbatim */ + |<---->|middle +\endverbatim */ inline float Bounce(float progress, float middle = 0.3f, float bounce = 0.4f) { if ( progress < middle ) @@ -250,6 +253,4 @@ inline float Bounce(float progress, float middle = 0.3f, float bounce = 0.4f) } } -/* @} */ // end of group - }; // namespace Math |