aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/src/vec3/ftm_vec3dot.c
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libftm/src/vec3/ftm_vec3dot.c')
-rw-r--r--vendor/libftm/src/vec3/ftm_vec3dot.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/libftm/src/vec3/ftm_vec3dot.c b/vendor/libftm/src/vec3/ftm_vec3dot.c
new file mode 100644
index 0000000..5d67ce6
--- /dev/null
+++ b/vendor/libftm/src/vec3/ftm_vec3dot.c
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ftm_vec3dot.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/05/09 21:06:09 by charles #+# #+# */
+/* Updated: 2020/05/09 21:14:44 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libftm_vec3.h"
+
+float ftm_vec3dot(t_ftmvec3 *a, t_ftmvec3 *b)
+{
+ return (a->v[0] * b->v[0] +
+ a->v[1] * b->v[1] +
+ a->v[2] * b->v[2]);
+}