KDATA_MIN(3) Library Functions Manual KDATA_MIN(3)

NAME

kdata_minfind minimum y-point in a data source

LIBRARY

library “libkplot”

SYNOPSIS

#include <cairo.h>
#include <kplot.h>
ssize_t
kdata_min(const struct kdata *data, struct kpair *kp);

DESCRIPTION

The kdata_min function finds 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_min returns -1. Otherwise, it returns the index of the minimum.

SEE ALSO

kdata_max(3), kplot(3)
January 26, 2015 OpenBSD 5.6