diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2022-04-30 08:41:56 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2022-04-30 08:42:45 -0400 |
commit | e164629b3839eee0fda0be0e0a9842e78cf02f2b (patch) | |
tree | b72b58665b85a104e5b953af45f00579341b2802 /source/periph/cordic.hpp | |
parent | 162dd6de8a0d883962b0b1475f47cbb08e0958d4 (diff) | |
parent | 3dd57491b1e81a9d93054eff19ca0e6c65c85b9b (diff) |
merge in branch devel
Diffstat (limited to 'source/periph/cordic.hpp')
-rw-r--r-- | source/periph/cordic.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/periph/cordic.hpp b/source/periph/cordic.hpp new file mode 100644 index 0000000..5d640cc --- /dev/null +++ b/source/periph/cordic.hpp @@ -0,0 +1,25 @@ +#ifndef CORDIC_HPP_ +#define CORDIC_HPP_ + +namespace cordic { + constexpr double PI = 3.1415926535L; + + void init(); + +#if !defined(TARGET_PLATFORM_L4) + double mod(double n, double d); + + double cos(double x); + double sin(double x); + double tan(double x); +#else + float mod(float n, float d); + + float cos(float x); + float sin(float x); + float tan(float x); +#endif +} + +#endif // CORDIC_HPP_ + |