comparison mathematics.h @ 547:3f9f807b86a4 libavutil

define some math constants so as not to depend on _XOPEN_SOURCE
author aurel
date Wed, 13 Aug 2008 10:04:59 +0000
parents f4187c1c15a6
children 8d46104adf83
comparison
equal deleted inserted replaced
546:b4e91071297f 547:3f9f807b86a4
20 20
21 #ifndef FFMPEG_MATHEMATICS_H 21 #ifndef FFMPEG_MATHEMATICS_H
22 #define FFMPEG_MATHEMATICS_H 22 #define FFMPEG_MATHEMATICS_H
23 23
24 #include <stdint.h> 24 #include <stdint.h>
25 #include <math.h>
25 #include "rational.h" 26 #include "rational.h"
27
28 #ifndef M_E
29 #define M_E 2.7182818284590452354 /* e */
30 #endif
31 #ifndef M_LN2
32 #define M_LN2 0.69314718055994530942 /* log_e 2 */
33 #endif
34 #ifndef M_LN10
35 #define M_LN10 2.30258509299404568402 /* log_e 10 */
36 #endif
37 #ifndef M_SQRT1_2
38 #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
39 #endif
26 40
27 enum AVRounding { 41 enum AVRounding {
28 AV_ROUND_ZERO = 0, ///< round toward zero 42 AV_ROUND_ZERO = 0, ///< round toward zero
29 AV_ROUND_INF = 1, ///< round away from zero 43 AV_ROUND_INF = 1, ///< round away from zero
30 AV_ROUND_DOWN = 2, ///< round toward -infinity 44 AV_ROUND_DOWN = 2, ///< round toward -infinity