Commit 74366dbb authored by Pranay Gupta's avatar Pranay Gupta

setting pi as a double or a float depending on the value of PD_FLOATSIZE

parent 2d590812
Pipeline #1359 failed with stage
in 0 seconds
......@@ -13,6 +13,14 @@ combustible materiel, or as part of any life support system or weapon. */
#pragma warning( disable : 4305 )
#endif
#if PD_FLOATSIZE == 32
const float pi = 3.14159;
#elif PD_FLOATSIZE == 64
const double pi = 3.141592653589793;
#else
#error invalid PD_FLOATSIZE must be 32 or 64
#endif
static t_class *pique_class;
typedef struct _pique
......@@ -43,7 +51,6 @@ static void *pique_new(t_floatarg f)
static t_float hanning(t_float pidetune, t_float sinpidetune)
{
t_float pi = 3.14159;
if (pidetune < 0.01 && pidetune > -0.01) return (1);
else if (pidetune > 3.14 && pidetune < 3.143) return (0.5);
else if (pidetune < -3.14 && pidetune > -3.143) return (0.5);
......@@ -92,7 +99,7 @@ static void pique_doit(int npts, t_word *fpreal, t_word *fpimag,
powthresh *= 0.00001;
for (count = 1; count < n2; count++)
{
t_float windreal, windimag, pi = 3.14159;
t_float windreal, windimag;
t_float detune, pidetune, sinpidetune, cospidetune,
ampcorrect, freqout, ampout, ampoutreal, ampoutimag;
t_float rpeak, rpeaknext, rpeakprev;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment