summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math/vco.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/math/vco.h')
-rw-r--r--gnuradio-runtime/lib/math/vco.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/gnuradio-runtime/lib/math/vco.h b/gnuradio-runtime/lib/math/vco.h
index d8a6fbb415..7ac1e1ca6d 100644
--- a/gnuradio-runtime/lib/math/vco.h
+++ b/gnuradio-runtime/lib/math/vco.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2005,2013 Free Software Foundation, Inc.
+ * Copyright 2005,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,6 +25,8 @@
#include <gnuradio/sincos.h>
#include <gnuradio/gr_complex.h>
+#include <gnuradio/math.h>
+
#include <vector>
#include <cmath>
@@ -49,13 +51,13 @@ namespace gr {
void adjust_phase(double delta_phase) {
d_phase += delta_phase;
- if(fabs (d_phase) > M_PI){
+ if(fabs (d_phase) > GR_M_PI){
- while(d_phase > M_PI)
- d_phase -= 2*M_PI;
+ while(d_phase > GR_M_PI)
+ d_phase -= 2*GR_M_PI;
- while(d_phase < -M_PI)
- d_phase += 2*M_PI;
+ while(d_phase < -GR_M_PI)
+ d_phase += 2*GR_M_PI;
}
}