cosine

double cosine(double x);

Returns the value of the Cosine kernel at the point x.

Parameters:
xValue to evaluate the kernal at.

Returns:
If -1 ≤ x ≤ 1, 0.5 (1.0 + cos(π x))
Otherwise, 0.0

Usage:
double r = cosine(0.75)

Header:
#include "kernels.h"