mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
added polar()
This commit is contained in:
parent
20515208f3
commit
6528c1581d
1 changed files with 6 additions and 0 deletions
|
|
@ -126,5 +126,11 @@ static constexpr T arg(Complex<T> a)
|
|||
return atan2(a.imag(), a.real());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static constexpr Complex<T> polar(T a, T b)
|
||||
{
|
||||
return Complex<T>(a * cos(b), a * sin(b));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue