pico-scale
|
Go to the source code of this file.
Functions | |
void | util_average (const int32_t *const arr, const size_t len, double *const avg) |
Calculates the average value from an array of signed 32-bit integers. More... | |
void | util_median (int32_t *const arr, const size_t len, double *const med) |
Calculates the median value from an array of signed 32-bit integers. More... | |
int | util__median_compare_func (const void *a, const void *b) |
int util__median_compare_func | ( | const void * | a, |
const void * | b | ||
) |
void util_average | ( | const int32_t *const | arr, |
const size_t | len, | ||
double *const | avg | ||
) |
Calculates the average value from an array of signed 32-bit integers.
arr | array of values |
len | number of values in the array |
avg |
Definition at line 27 of file util.c.
Referenced by scale_read().
void util_median | ( | int32_t *const | arr, |
const size_t | len, | ||
double *const | med | ||
) |
Calculates the median value from an array of signed 32-bit integers.
arr | array of values |
len | number of values in the array |
med |
If the number of elements is even, the median is the average of the middle two elements. Otherwise it is the middle element.
Definition at line 46 of file util.c.
References util__median_compare_func().
Referenced by scale_read().