aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/source/periph/cordic.hpp
blob: 5d640cca627f1b33e8dbe56ddb4bfcba386bb9f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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_