![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Functions ยท Generated namespace reference Rounds to the nearest integer, with ties away from zero. Rounds to the nearest integer, with halfway values moving away from zero. Scaling the input and result can quantise a signal to fractional steps. Based on round
klang::roundstd::round.Direct call
const signal stepped = round(sample * 8) / 8;Signal flow
const signal stepped = (sample * 8 >> round) / 8;