Klang C++ 0.7.15
Language Reference (draft)
Loading...
Searching...
No Matches
fdim

Language Guide / Functions ยท Generated namespace reference

fdim

klang::fdim

Positive difference of two values.

Returns the first argument minus the second, with a minimum of zero. For example, it can measure how far a sample exceeds a threshold.

-10-0.50.18800.3750.50.56210.75ResultInput x
fdim(x, 0.25)

Based on std::fdim.

Direct call

const signal excess = fdim(sample, 0.25);

Signal flow

const signal excess = sample >> fdim(0.25);