summaryrefslogtreecommitdiff
path: root/common/math_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/math_util.c')
-rw-r--r--common/math_util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/math_util.c b/common/math_util.c
index 6a49dc31c3..4cdddb1eab 100644
--- a/common/math_util.c
+++ b/common/math_util.c
@@ -126,7 +126,7 @@ static int int_sqrtf(fp_inter_t x)
}
#endif
-int vector_magnitude(const vector_3_t v)
+int vector_magnitude(const intv3_t v)
{
fp_inter_t sum = (fp_inter_t)v[0] * v[0] +
(fp_inter_t)v[1] * v[1] +
@@ -135,7 +135,7 @@ int vector_magnitude(const vector_3_t v)
return int_sqrtf(sum);
}
-fp_t cosine_of_angle_diff(const vector_3_t v1, const vector_3_t v2)
+fp_t cosine_of_angle_diff(const intv3_t v1, const intv3_t v2)
{
fp_inter_t dotproduct;
fp_inter_t denominator;
@@ -176,13 +176,13 @@ fp_t cosine_of_angle_diff(const vector_3_t v1, const vector_3_t v2)
* rotate a vector v
* - support input v and output res are the same vector
*/
-void rotate(const vector_3_t v, const matrix_3x3_t R, vector_3_t res)
+void rotate(const intv3_t v, const matrix_3x3_t R, intv3_t res)
{
fp_inter_t t[3];
if (R == NULL) {
if (v != res)
- memcpy(res, v, sizeof(vector_3_t));
+ memcpy(res, v, sizeof(intv3_t));
return;
}
@@ -204,14 +204,14 @@ void rotate(const vector_3_t v, const matrix_3x3_t R, vector_3_t res)
res[2] = FP_TO_INT(t[2]);
}
-void rotate_inv(const vector_3_t v, const matrix_3x3_t R, vector_3_t res)
+void rotate_inv(const intv3_t v, const matrix_3x3_t R, intv3_t res)
{
fp_inter_t t[3];
fp_t deter;
if (R == NULL) {
if (v != res)
- memcpy(res, v, sizeof(vector_3_t));
+ memcpy(res, v, sizeof(intv3_t));
return;
}