summaryrefslogtreecommitdiff
path: root/mmband/waves/saw.c
blob: 4ce76631c019c52580894d1a5887ca3d35dd58a1 (plain)
1
2
3
4
5
6
#include <math.h>
#include <mmband/waves/waveform.h>

float saw (float phase) {
    return -1.0 - (2.0 * fmod(phase / M_PI, 1.0));
}