00001 00005 #include <bpm/bpm_dsp.h> 00006 00007 00008 void norm_phase( double *phase ) { 00009 00010 if ( ! phase ) return; 00011 while ( *phase < 0.0 ) *phase += 2.0*PI; 00012 while ( *phase >= 2.0*PI ) *phase -= 2.0*PI; 00013 00014 return; 00015 }