![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Functions ยท Generated namespace reference Magnitude of the first operand with the sign of the second. Combines the magnitude of one value with the sign of another. Copying the sign of a sine onto a magnitude of 0.707 produces a square wave with abrupt edges that can alias. Based on Declare Route the result directly to copysign
klang::copysignstd::copysign.Sine sine; as a member. Both examples read one sample from it in process().Direct call
const signal square = copysign(0.707, sine(440));Signal flow
out. The oscillator supplies the sign and the first argument supplies the magnitude.copysign(0.707, sine(440)) >> out;