From 8046aa32043bf58ef0a6657b2fba8fe357a294af Mon Sep 17 00:00:00 2001
From: n4hy
Date: Thu, 14 Dec 2006 18:03:00 +0000
Subject: These routines have been modified to use fast atan2

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4084 221aa14e-8319-0410-a670-987f0aec2ac5
---
 gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc | 3 ++-
 gnuradio-core/src/lib/general/gr_pll_refout_cc.cc  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc
index f090a3e00..8f27e3a00 100644
--- a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc
+++ b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc
@@ -29,6 +29,7 @@
 #include <gr_pll_freqdet_cf.h>
 #include <gr_io_signature.h>
 #include <math.h>
+#include <gr_math.h>
 
 #define M_TWOPI (2*M_PI)
 
@@ -63,7 +64,7 @@ float
 gr_pll_freqdet_cf::phase_detector(gr_complex sample,float ref_phase)
 {
   float sample_phase;
-  sample_phase = atan2(sample.imag(),sample.real());
+  sample_phase = gr_fast_atan2f(sample.imag(),sample.real());
   return mod_2pi(sample_phase-ref_phase);
 }
 
diff --git a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc
index 3208c5841..e39f8dd4a 100644
--- a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc
+++ b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc
@@ -30,6 +30,7 @@
 #include <gr_io_signature.h>
 #include <gr_sincos.h>
 #include <math.h>
+#include <gr_math.h>
 
 #define M_TWOPI (2*M_PI)
 
@@ -64,7 +65,7 @@ float
 gr_pll_refout_cc::phase_detector(gr_complex sample,float ref_phase)
 {
   float sample_phase;
-  sample_phase = atan2(sample.imag(),sample.real());
+  sample_phase = gr_fast_atan2f(sample.imag(),sample.real());
   return mod_2pi(sample_phase-ref_phase);
 }
 
-- 
cgit