not a nested function
#include "fltools.h"
-
-
-void zsort(int N, complex float tmp[N])
-{
- NESTED(int, compare, (const void* _a, const void* _b))
+static int compare(const void* _a, const void* _b)
{
const complex float* a = _a;
const complex float* b = _b;
return copysignf(1., (cabsf(*a) - cabsf(*b)));
- };
+}
+
+void zsort(int N, complex float tmp[N])
+{
qsort(tmp, N, sizeof(complex float), compare);
}
