Clean up complex<int16_t> -> complex<float> casting.

This commit is contained in:
Jared Boone 2015-11-20 11:01:41 -08:00
parent 85e984ed3b
commit 600a983d5c
3 changed files with 9 additions and 12 deletions

View file

@ -105,6 +105,13 @@ public:
return _rep;
}
constexpr operator std::complex<float>() const {
return {
static_cast<float>(_v[0]),
static_cast<float>(_v[1])
};
}
private:
union {
int16_t _v[2];