annotate maths/MathAliases.h @ 209:ccd2019190bf msvc

Some MSVC fixes, including (temporarily, probably) renaming the FFT source file to avoid getting it mixed up with the Vamp SDK one in our object dir
author Chris Cannam
date Thu, 01 Feb 2018 16:34:08 +0000
parents e5907ae6de17
children
rev   line source
cannam@0 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@0 2
cannam@0 3 /*
cannam@0 4 QM DSP Library
cannam@0 5
cannam@0 6 Centre for Digital Music, Queen Mary, University of London.
Chris@84 7 This file 2005-2006 Christian Landone.
Chris@84 8
Chris@84 9 This program is free software; you can redistribute it and/or
Chris@84 10 modify it under the terms of the GNU General Public License as
Chris@84 11 published by the Free Software Foundation; either version 2 of the
Chris@84 12 License, or (at your option) any later version. See the file
Chris@84 13 COPYING included with this distribution for more information.
cannam@0 14 */
cannam@0 15
cannam@0 16 #ifndef MATHALIASES_H
cannam@0 17 #define MATHALIASES_H
cannam@0 18
cannam@0 19 #include <cmath>
cannam@0 20 #include <complex>
cannam@0 21
cannam@0 22 using namespace std;
cannam@0 23 typedef complex<double> ComplexData;
cannam@0 24
cannam@0 25
cannam@0 26 #ifndef PI
cannam@0 27 #define PI (3.14159265358979232846)
cannam@0 28 #endif
cannam@0 29
cannam@54 30 #define TWO_PI (2. * PI)
cannam@0 31
cannam@0 32 #define EPS 2.2204e-016
cannam@0 33
cannam@0 34 /* aliases to math.h functions */
cannam@0 35 #define EXP exp
cannam@0 36 #define COS cos
cannam@0 37 #define SIN sin
cannam@0 38 #define ABS fabs
cannam@0 39 #define POW powf
cannam@0 40 #define SQRT sqrtf
cannam@0 41 #define LOG10 log10f
cannam@0 42 #define LOG logf
cannam@0 43 #define FLOOR floorf
cannam@0 44 #define TRUNC truncf
cannam@0 45
cannam@0 46 /* aliases to complex.h functions */
cannam@0 47 /** sample = EXPC(complex) */
cannam@0 48 #define EXPC cexpf
cannam@0 49 /** complex = CEXPC(complex) */
cannam@0 50 #define CEXPC cexp
cannam@0 51 /** sample = ARGC(complex) */
cannam@0 52 #define ARGC cargf
cannam@0 53 /** sample = ABSC(complex) norm */
cannam@0 54 #define ABSC cabsf
cannam@0 55 /** sample = REAL(complex) */
cannam@0 56 #define REAL crealf
cannam@0 57 /** sample = IMAG(complex) */
cannam@0 58 #define IMAG cimagf
cannam@0 59
cannam@0 60 #endif