![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Functions ยท Generated namespace reference Logarithm with base two. Returns the base-2 logarithm of a positive value. It can express a frequency ratio as an octave offset. Based on log2
klang::log2std::log2.Direct call
const signal octaves = log2(hz / 440);Signal flow
const signal octaves = hz / 440 >> log2;