diff options
author | David Robillard <d@drobilla.net> | 2011-10-03 05:22:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-03 05:22:14 +0000 |
commit | e550736dbb862d8333a4d7f2ede9804a3d48326c (patch) | |
tree | 185b6f0483cbfe2fae87bb61b0e123fb2353b5d5 /src/include/math_func.h | |
download | blop.lv2-e550736dbb862d8333a4d7f2ede9804a3d48326c.tar.gz blop.lv2-e550736dbb862d8333a4d7f2ede9804a3d48326c.tar.bz2 blop.lv2-e550736dbb862d8333a4d7f2ede9804a3d48326c.zip |
Add 'blip', an LV2 port of the LADSPA 'blop' collection.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blip.lv2@3525 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/include/math_func.h')
-rw-r--r-- | src/include/math_func.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/include/math_func.h b/src/include/math_func.h new file mode 100644 index 0000000..c44075d --- /dev/null +++ b/src/include/math_func.h @@ -0,0 +1,36 @@ +/* + * Provide double fallbacks for environments lacking sinf and + * friends (e.g. Solaris) + */ + +#ifndef math_func_h +#define math_func_h + +#include <math.h> +#include "config.h" + +#ifdef HAVE_SINF +/* Use float functions */ +#define SINF(x) sinf(x) +#define COSF(x) cosf(x) +#define FABSF(x) fabsf(x) +#define FLOORF(x) floorf(x) +#define EXPF(x) expf(x) +#define POWF(x,p) powf(x,p) +#define COPYSIGNF(s,d) copysignf(s,d) +#define LRINTF(x) lrintf(x) + +#else +/* Use double functions */ +#define SINF(x) sin(x) +#define COSF(x) cos(x) +#define FABSF(x) fabs(x) +#define FLOORF(x) floor(x) +#define EXPF(x) exp(x) +#define POWF(x,p) pow(x) +#define COPYSIGNF(s,d) copysign(s,d) +#define LRINTF(x) lrint(x) + +#endif + +#endif |