20.10.2013 - Modified PIObject - virtual debugName() for macro piCoutObj, improved timer measurements and timers on Windows
This commit is contained in:
3
pimath.h
3
pimath.h
@@ -130,6 +130,9 @@ inline double fromDb(double val) {return pow(10., val / 10.);}
|
||||
inline double toRad(double deg) {return deg * M_PI_180;}
|
||||
inline double toDeg(double rad) {return rad * M_180_PI;}
|
||||
|
||||
template<typename T>
|
||||
inline PICout operator <<(PICout s, const complex<T> & v) {s.space(); s.setControl(0, true); s << "(" << v.real() << "; " << v.imag() << ")"; s.restoreControl(); return s;}
|
||||
|
||||
// [-1 ; 1]
|
||||
inline double randomd() {return (double)random() / RAND_MAX * 2. - 1.;}
|
||||
// [-1 ; 1] normal
|
||||
|
||||
Reference in New Issue
Block a user