summaryrefslogtreecommitdiff
path: root/gr-analog/lib/pll_freqdet_cf_impl.cc
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-03-22 22:29:21 +0100
committerMarcus Müller <marcus@hostalia.de>2018-03-22 22:32:12 +0100
commitd3aba0022c3317bc8856f05612cafcdca4b4d667 (patch)
tree9dd5ddbf8db2f357754a73b4eed4d0cc8924360a /gr-analog/lib/pll_freqdet_cf_impl.cc
parent9ae5d4cd3da84ce7e5a0c2abe7fec1ff8d229ae8 (diff)
parent886ce0f13b4135c1206c26786e06a524e92fc271 (diff)
Merge branch 'fix_cmake_cxx_standard' of https://github.com/noc0lour/gnuradio into noc0lour-fix_cmake_cxx_standard
Diffstat (limited to 'gr-analog/lib/pll_freqdet_cf_impl.cc')
-rw-r--r--gr-analog/lib/pll_freqdet_cf_impl.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/gr-analog/lib/pll_freqdet_cf_impl.cc b/gr-analog/lib/pll_freqdet_cf_impl.cc
index 42caa0bfd5..46c9a9f954 100644
--- a/gr-analog/lib/pll_freqdet_cf_impl.cc
+++ b/gr-analog/lib/pll_freqdet_cf_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010,2011 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2011,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,16 +26,13 @@
#include "pll_freqdet_cf_impl.h"
#include <gnuradio/io_signature.h>
-#include <math.h>
#include <gnuradio/math.h>
+#include <cmath>
+
namespace gr {
namespace analog {
-#ifndef M_TWOPI
-#define M_TWOPI (2.0f*M_PI)
-#endif
-
pll_freqdet_cf::sptr
pll_freqdet_cf::make(float loop_bw, float max_freq, float min_freq)
{
@@ -58,10 +55,10 @@ namespace gr {
float
pll_freqdet_cf_impl::mod_2pi(float in)
{
- if(in > M_PI)
- return in - M_TWOPI;
- else if(in < -M_PI)
- return in + M_TWOPI;
+ if(in > GR_M_PI)
+ return in - GR_M_TWOPI;
+ else if(in < -GR_M_PI)
+ return in + GR_M_TWOPI;
else
return in;
}