Tests/testDSL.cpp
/**
 * Generate cos values to compare with
 */
Generate cos values to compare with
Generate cos values to compare with
std::vector<float> lib_cos_values(int size, float freq = -1.0f, float offset = 0.0f) {
  if (freq == -1.0f) {
    freq = 1.0f/((float) size);
  }
  std::vector<float> ret;
  ret.resize(size);
  for (int x = 0; x < size; ++x) {
    ret[x] = cos((float) (freq*(2*M_PI)*(((float) x) - offset)));
  }
  return ret;
}
std :: vector < float > lib_cos_values ( int size , float freq = -1.0f , float offset = 0.0f ) { if ( freq == -1.0f ) { freq = 1.0f / ( ( float ) size ) ; } std :: vector < float > ret ; ret . resize ( size ) ; for ( int x = 0 ; x < size ; ++ x ) { ret [ x ] = cos ( ( float ) ( freq * ( 2 * M_PI ) * ( ( ( float ) x ) - offset ) ) ) ; } return ret ; }
Generate cos values to compare with
Generate cos values to compare with