문제

I am having trouble finding out how to form a triangle (not sawtooth) wave from a sine wave.

I understand how to create it for a Square wave:

if( sineValue >= 0 )
        value = amp;
    else
        value = -amp;

But I am not sure how to change this to accommodate for a triangle wave.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top