mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
21 lines
223 B
C++
21 lines
223 B
C++
/*
|
|
Some little helpers
|
|
|
|
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
|
*/
|
|
|
|
#ifndef UTILS_HH
|
|
#define UTILS_HH
|
|
|
|
namespace DSP {
|
|
|
|
template <typename TYPE>
|
|
int signum(TYPE v)
|
|
{
|
|
return (v > TYPE(0)) - (v < TYPE(0));
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|