KDATA_XMIN(3) Library Functions Manual KDATA_XMIN(3)

NAME

kdata_xmin, kdata_yminfind minima in a data source

LIBRARY

library “libkplot”

SYNOPSIS

#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);

DESCRIPTION

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.

RETURN VALUES

If the data source has zero entries, kdata_xmin and kdata_ymin return -1. Otherwise, they return the index of the minimum.

SEE ALSO

kdata_xmax(3), kdata_ymax(3), kplot(3)
January 29, 2015 OpenBSD 5.8