ecl_math Documentation

*
This package provides simple support to cmath, filling in holes
or redefining in a c++ formulation where desirable.
*

- Homepage: http://ros.org/wiki/ecl_math

This group includes various mathematical macros, constants and utility functions/functors.

Include the following at the top of any translation unit which requires this library:

#include <ecl/math.hpp> // constants using ecl::pi; // also pi_2, pi_4 // simple functions using ecl::EuclideanNorm; using ecl::isApprox; using ecl::isApproxOrLessThan; using ecl::sign; // also psign using ecl::cube_root; // only for real numbers/solutions

Since it is a collection of macros and headers only, no linking is required if you are only utilising this functionality.

Usually there will always be macros for pi defined in *math.h*, namely M_PI, M_PI_2, etc... (sometimes they're unavailable, e.g. windoze!). For typesafe definitions, the ecl defines a couple of these similarly in the ecl::math namespace.

Various regularly used functions are also present - usually in the form of functors (useful for passing around should it ever be necessary).

- ecl::EuclideanNorm
- ecl::isApprox
- ecl::isApproxOrLessThan

- /src/test/constants.cpp
- /src/test/fuzzy.cpp
- /src/test/norms.cpp

**Dec 10**: fuzzy math.**Sep 10**: better detection/setting of pi constants on posix/non-posix platforms.**Feb 10**: Euclidean norm functor (currently only l2 norm).**May 09**: Macros for pi undefined and c++ style pi constants made available.