mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 22:35:45 +00:00
added const.hh for some constants
This commit is contained in:
parent
2d4e1886c3
commit
4e00849662
2 changed files with 25 additions and 0 deletions
|
|
@ -20,3 +20,7 @@ Implemented are the follwing [Window functions](https://en.wikipedia.org/wiki/Wi
|
|||
* [Gaussian window](https://en.wikipedia.org/wiki/Window_function#Gaussian_window)
|
||||
* [Kaiser window](https://en.wikipedia.org/wiki/Window_function#Kaiser_window)
|
||||
|
||||
### [const.hh](const.hh)
|
||||
|
||||
Some constants we need
|
||||
|
||||
|
|
|
|||
21
const.hh
Normal file
21
const.hh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
Some constants
|
||||
|
||||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef CONST_HH
|
||||
#define CONST_HH
|
||||
|
||||
namespace DSP {
|
||||
|
||||
template <typename T>
|
||||
struct Const {
|
||||
static inline T Pi() { return 3.14159265358979323846; } // 4*a(1)
|
||||
static inline T TwoPi() { return 6.28318530717958647693; } // 8*a(1)
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue