| KDATA_MAX(3) | Library Functions Manual | KDATA_MAX(3) | 
NAME
 kdata_max — find maximum y-point in a data source
LIBRARY
 library “libkplot”
SYNOPSIS
 #include <cairo.h>
#include <kplot.h>
ssize_t
kdata_max(
const struct kdata *data, 
struct kpair *kp);
 
DESCRIPTION
 The kdata_max function finds the maximum point in a data source, filling in kp if it is not NULL. The maximum point is the first maximum: thus, if multiple minima exist of the same value, the first will be returned.
RETURN VALUES
 If the data source has zero entries, kdata_max returns -1. Otherwise, it returns the index of the maximum.