defocus-modules/lib/utils.c

11 lines
250 B
C
Raw Permalink Normal View History

#include <defocus/defocus.h>
#include <math.h>
DF_API float df_max_f32(const float *list, unsigned int count)
{
float max = -INFINITY;
for (unsigned int i = 0; i < count; ++i)
max = (max < list[i]) ? list[i] : max;
return max;
}