summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorJosh Blum2011-02-26 14:48:34 -0800
committerJosh Blum2011-02-27 19:52:10 -0800
commit8e5f4bc89af1682b258ecb1bc46b04d24ea3addd (patch)
treeb4600aeb03b5ea59652cc7fdc8dddf578368fae8 /gnuradio-core
parenta02bb131f68d5aa66093310c393562671e389778 (diff)
downloadgnuradio-8e5f4bc89af1682b258ecb1bc46b04d24ea3addd.tar.gz
gnuradio-8e5f4bc89af1682b258ecb1bc46b04d24ea3addd.tar.bz2
gnuradio-8e5f4bc89af1682b258ecb1bc46b04d24ea3addd.zip
use boost::math::trunc in gr_frequency_modulator_fc.cc
this replaces the need for a conditional trunc implementation in config.h
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc
index 0f6f0d719..bff22be25 100644
--- a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc
+++ b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -28,6 +28,7 @@
#include <gr_io_signature.h>
#include <gr_sincos.h>
#include <math.h>
+#include <boost/math/special_functions/trunc.hpp>
gr_frequency_modulator_fc_sptr gr_make_frequency_modulator_fc (double sensitivity)
@@ -62,7 +63,7 @@ gr_frequency_modulator_fc::work (int noutput_items,
// to avoid loss of precision in the addition above.
if (fabs (d_phase) > 16 * M_PI){
- double ii = trunc (d_phase / (2 * M_PI));
+ double ii = boost::math::trunc (d_phase / (2 * M_PI));
d_phase = d_phase - (ii * 2 * M_PI);
}