aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/source/periph/cordic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/source/periph/cordic.hpp')
-rw-r--r--firmware/source/periph/cordic.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/firmware/source/periph/cordic.hpp b/firmware/source/periph/cordic.hpp
index 5d640cc..a9a0466 100644
--- a/firmware/source/periph/cordic.hpp
+++ b/firmware/source/periph/cordic.hpp
@@ -1,11 +1,33 @@
+/**
+ * @file cordic.hpp
+ * @brief Provides mathematical functions for algorithms.
+ *
+ * Copyright (C) 2023 Clyne Sullivan
+ *
+ * Distributed under the GNU GPL v3 or later. You should have received a copy of
+ * the GNU General Public License along with this program.
+ * If not, see <https://www.gnu.org/licenses/>.
+ */
+
#ifndef CORDIC_HPP_
#define CORDIC_HPP_
+/**
+ * Named after the hardware CORDIC peripheral even though software
+ * implementations may be used.
+ */
namespace cordic {
+ // Provides pi in case cordic functions require it.
constexpr double PI = 3.1415926535L;
+ /**
+ * Prepares cordic functions for use.
+ */
void init();
+ // mod - Calculates remainder for given fraction.
+ // cos, sin, tan - The trig functions.
+
#if !defined(TARGET_PLATFORM_L4)
double mod(double n, double d);