Skip to content

Function nearest

function nearest(M, T, T) math

template <typename T, typename M>
KFR_FUNCTION T nearest(M mu, T x1, T x2)

Nearest-neighbor interpolation.

Template parameters
T sample (value) type, also the return type.
M interpolation-parameter type used for the comparison threshold.
Parameters
mu interpolation parameter in the range [0, 1].
x1 value returned for mu < 0.5.
x2 value returned for mu >= 0.5.
Returns
x1 or x2 depending on the mu threshold.

Fully qualified name: kfr::nearest(M, T, T)

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.