![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Functions ยท Generated namespace reference Logarithm with base ten. Returns the base-10 logarithm of a positive value. One application is converting an amplitude ratio to decibels. Based on log10
klang::log10std::log10.Direct call
const signal level = 20 * log10(max(abs(sample), 0.001));Signal flow
const signal level = (sample >> abs >> max(0.001) >> log10) * 20;