mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Expose fast_log2().
This commit is contained in:
parent
7d60b940d6
commit
d2531016e5
@ -59,7 +59,7 @@ uint32_t gcd(const uint32_t u, const uint32_t v) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static float fast_log2(const float val) {
|
||||
float fast_log2(const float val) {
|
||||
// Thank you Stack Overflow!
|
||||
// http://stackoverflow.com/questions/9411823/fast-log2float-x-implementation-c
|
||||
union {
|
||||
|
@ -69,6 +69,8 @@ constexpr size_t log_2(const size_t n, const size_t p = 0) {
|
||||
return (n <= 1) ? p : log_2(n / 2, p + 1);
|
||||
}
|
||||
|
||||
float fast_log2(const float val);
|
||||
|
||||
float complex16_mag_squared_to_dbv_norm(const float c16_mag_squared);
|
||||
|
||||
inline float magnitude_squared(const std::complex<float> c) {
|
||||
|
Loading…
Reference in New Issue
Block a user