Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Keywords: ecl math
Tutorial Level: BEGINNER
Macros for PI
Usually there will always be macros for pi defined in <i>math.h</i>, namely M_PI, M_PI_2, etc... (sometimes they're unavailable, e.g. windoze!). For typesafe definitions, the ecl also defines these as constants in the ecl namespace.
Simple Functions
Various regularly used functions are also present - usually in the form of functors (useful for passing around should it ever be necessary).
Sign
Euclidean Norms
Cube Root
Fuzzy Operators
Not, 'fuzzy logic'...
Approximately
The bound of the approximation is by default, determined by the machine precision on your machine. If a user specified epsilon bound is preferred, that can be added as an optional third argument to either function.