aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/src/vec4/ftm_vec4dot.c
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libftm/src/vec4/ftm_vec4dot.c')
-rw-r--r--vendor/libftm/src/vec4/ftm_vec4dot.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/libftm/src/vec4/ftm_vec4dot.c b/vendor/libftm/src/vec4/ftm_vec4dot.c
new file mode 100644
index 0000000..dc8864a
--- /dev/null
+++ b/vendor/libftm/src/vec4/ftm_vec4dot.c
@@ -0,0 +1,21 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ftm_vec4dot.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/05/09 21:06:09 by charles #+# #+# */
+/* Updated: 2020/05/09 21:15:32 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libftm_vec4.h"
+
+float ftm_vec4dot(t_ftmvec4 *a, t_ftmvec4 *b)
+{
+ return (a->v[0] * b->v[0] +
+ a->v[1] * b->v[1] +
+ a->v[2] * b->v[2] +
+ a->v[3] * b->v[3]);
+}