mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
unwrap -> wrap_around
This commit is contained in:
parent
6fc424dca6
commit
fe59404f1f
1 changed files with 2 additions and 2 deletions
4
fmd.hh
4
fmd.hh
|
|
@ -15,7 +15,7 @@ class FMD1
|
|||
typedef typename complex_type::value_type value_type;
|
||||
value_type prev;
|
||||
value_type scale;
|
||||
value_type unwrap(value_type angle)
|
||||
value_type wrap_around(value_type angle)
|
||||
{
|
||||
if (angle < -DSP::Const<value_type>::Pi())
|
||||
return angle + DSP::Const<value_type>::TwoPi();
|
||||
|
|
@ -35,7 +35,7 @@ public:
|
|||
{
|
||||
value_type phase = arg(input);
|
||||
value_type delta = phase - prev;
|
||||
delta = unwrap(delta);
|
||||
delta = wrap_around(delta);
|
||||
prev = phase;
|
||||
return scale * delta;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue