summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/mat.c4
-rw-r--r--src/math/math.h4
-rw-r--r--src/math/vec3.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/math/mat.c b/src/math/mat.c
index f889697..8b32ba2 100644
--- a/src/math/mat.c
+++ b/src/math/mat.c
@@ -322,7 +322,7 @@ bool mat4_setlookrotation(Vec3* view, Vec3* up, Mat4* out) {
return 1;
}
-void mat4_applytovec4(Mat4* mat, Vec4* v, Vec4* out) {
+void mat4_mulvec4(Mat4* mat, Vec4* v, Vec4* out) {
ssr_assert(mat && v && out);
if (v == out) {
sharedVec4 = *v;
@@ -337,7 +337,7 @@ void mat4_applytovec4(Mat4* mat, Vec4* v, Vec4* out) {
/*
** mat3 apply to vec3
*/
-void mat4_applytovec3(Mat4* mat, Vec3* v, Vec3* out) {
+void mat4_mulvec3(Mat4* mat, Vec3* v, Vec3* out) {
ssr_assert(mat && v && out);
if (v == out) {
sharedVec3 = *v;
diff --git a/src/math/math.h b/src/math/math.h
index 41b4607..8793336 100644
--- a/src/math/math.h
+++ b/src/math/math.h
@@ -235,8 +235,8 @@ void mat4_invertpos(Mat4* pos, Mat4* out); /* 对平移矩阵求逆 */
void mat4_decomposetrs(Mat4* src, Vec3* pos, Quat* quat, Vec3* scale); /*分解trs矩阵*/
-void mat4_applytovec4(Mat4* m, Vec4* v, Vec4* out);
-void mat4_applytovec3(Mat4* m, Vec3* v, Vec3* out);
+void mat4_mulvec4(Mat4* m, Vec4* v, Vec4* out);
+void mat4_mulvec3(Mat4* m, Vec3* v, Vec3* out);
bool mat4_toeuler(Mat4* in, Euler* out); /* 计算YXZ旋转矩阵的欧拉角 */
void mat4_toquat(Mat4* in, Quat* out); /*in是正交矩阵*/
diff --git a/src/math/vec3.c b/src/math/vec3.c
index 917c4d1..d2fb652 100644
--- a/src/math/vec3.c
+++ b/src/math/vec3.c
@@ -77,7 +77,7 @@ void vec3_slerp(Vec3* v1, Vec3* v2, float t, Vec3* out) {
Vec3 v1n; vec3_normalize(v1, &v1n);
float angle = acos(dot) * t;
//Mat4 m; mat4_setaxisangle(&axis, angle, &m);
- //mat4_applytovec4(&m, &v1n, &v1n);
+ //mat4_mulvec4(&m, &v1n, &v1n);
Quat q; quat_fromaxisangle(&axis, angle, &q);
quat_applytovec3(&q, &v1n, &v1n);
vec3_scale(&v1n, lerplen, out);