# HG changeset patch # User aurel # Date 1218621899 0 # Node ID 3f9f807b86a47599f0065fde71ed244a7f0cdab3 # Parent b4e91071297fe82f9350d3cb821ffdb5dfc609cd define some math constants so as not to depend on _XOPEN_SOURCE diff -r b4e91071297f -r 3f9f807b86a4 mathematics.h --- a/mathematics.h Fri Aug 08 19:50:35 2008 +0000 +++ b/mathematics.h Wed Aug 13 10:04:59 2008 +0000 @@ -22,8 +22,22 @@ #define FFMPEG_MATHEMATICS_H #include +#include #include "rational.h" +#ifndef M_E +#define M_E 2.7182818284590452354 /* e */ +#endif +#ifndef M_LN2 +#define M_LN2 0.69314718055994530942 /* log_e 2 */ +#endif +#ifndef M_LN10 +#define M_LN10 2.30258509299404568402 /* log_e 10 */ +#endif +#ifndef M_SQRT1_2 +#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ +#endif + enum AVRounding { AV_ROUND_ZERO = 0, ///< round toward zero AV_ROUND_INF = 1, ///< round away from zero