mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 06:47:42 +00:00
Extract magnitude_squared to utility.
This commit is contained in:
@@ -67,7 +67,6 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <complex>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <bitset>
|
||||
@@ -688,14 +687,6 @@ static void init() {
|
||||
);
|
||||
}
|
||||
|
||||
static inline float magnitude_squared(const std::complex<float> c) {
|
||||
const auto r = c.real();
|
||||
const auto r2 = r * r;
|
||||
const auto i = c.imag();
|
||||
const auto i2 = i * i;
|
||||
return r2 + i2;
|
||||
}
|
||||
|
||||
class EventDispatcher {
|
||||
public:
|
||||
MessageHandlerMap& message_handlers() {
|
||||
|
Reference in New Issue
Block a user