kdata_xmin,
kdata_ymin — find minima in
a data source
#include <cairo.h>
#include <kplot.h>
ssize_t
kdata_xmin(const struct kdata
*data, struct kpair *kp);
ssize_t
kdata_ymin(const struct kdata
*data, struct kpair *kp);
The kdata_xmin and
kdata_ymin functions find the minimum point in a
data source, filling in kp if it is not
NULL. The minimum point is the first minimum: thus,
if multiple minima exist of the same value, the first will be returned.
If the data source has zero entries,
kdata_xmin and kdata_ymin
return -1. Otherwise, they return the index of the minimum.