aboutsummaryrefslogtreecommitdiff
path: root/xtract/xtract_scalar.h
diff options
context:
space:
mode:
authorJamie Bullock <jamie@jamiebullock.com>2014-02-11 16:39:41 +0000
committerJamie Bullock <jamie@jamiebullock.com>2014-02-11 16:39:41 +0000
commit1ba85b048b5d7e9cee0453b48a1f0ff16990cfa7 (patch)
tree053092e1da54d0736ffd2f8f96d54ecae20b6eba /xtract/xtract_scalar.h
parent4805c96fce84b57ed44327a6e4e91a9d970ea27a (diff)
downloadLibXtract-1ba85b048b5d7e9cee0453b48a1f0ff16990cfa7.tar.gz
LibXtract-1ba85b048b5d7e9cee0453b48a1f0ff16990cfa7.tar.bz2
LibXtract-1ba85b048b5d7e9cee0453b48a1f0ff16990cfa7.zip
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
Diffstat (limited to 'xtract/xtract_scalar.h')
-rw-r--r--xtract/xtract_scalar.h7
1 files changed, 6 insertions, 1 deletions
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);