We've had a mix of min, max from libpspp/misc.h and MIN, MAX from
[pspp-builds.git] / src / math / percentiles.c
index 7fec4ce9d5e36871232654ad5e56d04847b351ff..b72a98a1261778ae24fa372e09bdbddb87db8adc 100644 (file)
@@ -19,18 +19,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 02110-1301, USA. */
 
 #include <config.h>
+#include <assert.h>
 #include <libpspp/compiler.h>
 #include "factor-stats.h"
 #include "percentiles.h"
 #include <libpspp/misc.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-#include <assert.h>
-
-
 struct ptile_params
 {
   double g1, g1_star;
@@ -337,7 +337,7 @@ tukey_hinges(const struct weighted_value **wv,
   
   for ( i = 0 ; i < n_data ; ++i ) 
     {
-      c_star = min(c_star, wv[i]->w);
+      c_star = MIN(c_star, wv[i]->w);
     }
 
   if ( c_star > 1 ) c_star = 1;