From 1ba85b048b5d7e9cee0453b48a1f0ff16990cfa7 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Tue, 11 Feb 2014 16:39:41 +0000 Subject: Make xtract_lowest_value() return XTRACT_NO_RESULT if all values in the input data are below or equal to threshold value. Fixes #46 If XTRACT_NO_RESULT is returned, *result will be set to DBL_MAX --- xtract/xtract_scalar.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xtract/xtract_scalar.h') diff --git a/xtract/xtract_scalar.h b/xtract/xtract_scalar.h index 50fc213..dc0e5cf 100644 --- a/xtract/xtract_scalar.h +++ b/xtract/xtract_scalar.h @@ -353,8 +353,13 @@ int xtract_spectral_slope(const double *data, const int N, const void *argv, dou * * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered - * \param *argv: a pointer to a double representing the lower limit for the search. i.e. (*result > *argv) returns 1. + * \param *argv: a pointer to a double representing the lower limit for the search. All values in the array pointed to by *data that are below or equal to this threshold will be ignored. * \param *result: a pointer to a value representing the lowest component in *data that falls above a given threshold. + * + * \return XTRACT_SUCCESS is a lowest value was found or XTRACT_NO_VALUE if all values + * in the array pointed to by *data are below or equal to the threshold set with *argv + * + * \note If XTRACT_NO_VALUE is returned, *result will be set to DBL_MAX * */ int xtract_lowest_value(const double *data, const int N, const void *argv, double *result); -- cgit v1.2.3