From 4e008496622f4dc915422765fe27ad08704a744e Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Sun, 4 Mar 2018 08:23:57 +0100 Subject: [PATCH] added const.hh for some constants --- README.md | 4 ++++ const.hh | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 const.hh diff --git a/README.md b/README.md index ade8f65..cd7096b 100644 --- a/README.md +++ b/README.md @@ -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 + diff --git a/const.hh b/const.hh new file mode 100644 index 0000000..7590e18 --- /dev/null +++ b/const.hh @@ -0,0 +1,21 @@ +/* +Some constants + +Copyright 2018 Ahmet Inan +*/ + +#ifndef CONST_HH +#define CONST_HH + +namespace DSP { + +template +struct Const { + static inline T Pi() { return 3.14159265358979323846; } // 4*a(1) + static inline T TwoPi() { return 6.28318530717958647693; } // 8*a(1) +}; + +} + +#endif +