summaryrefslogtreecommitdiff
path: root/include/math_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/math_util.h')
-rw-r--r--include/math_util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/math_util.h b/include/math_util.h
index 044c411b23..6ae36a995b 100644
--- a/include/math_util.h
+++ b/include/math_util.h
@@ -8,7 +8,12 @@
#ifndef __CROS_MATH_UTIL_H
#define __CROS_MATH_UTIL_H
+#ifdef CONFIG_FPU
typedef float matrix_3x3_t[3][3];
+#else
+typedef int matrix_3x3_t[3][3];
+#endif
+
typedef int vector_3_t[3];
@@ -16,6 +21,7 @@ typedef int vector_3_t[3];
#define SQ(x) ((x) * (x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
+#ifdef CONFIG_FPU
/**
* Find acos(x) in degrees. Argument is clipped to [-1.0, 1.0].
@@ -36,6 +42,8 @@ float arc_cos(float x);
*/
float cosine_of_angle_diff(const vector_3_t v1, const vector_3_t v2);
+#endif
+
/**
* Rotate vector v by rotation matrix R.
*