aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/src/vec/ftm_vecsub.c
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libftm/src/vec/ftm_vecsub.c')
-rw-r--r--vendor/libftm/src/vec/ftm_vecsub.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/libftm/src/vec/ftm_vecsub.c b/vendor/libftm/src/vec/ftm_vecsub.c
new file mode 100644
index 0000000..0ac8ae1
--- /dev/null
+++ b/vendor/libftm/src/vec/ftm_vecsub.c
@@ -0,0 +1,28 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ftm_vecsub.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/05/11 12:39:42 by charles #+# #+# */
+/* Updated: 2020/05/11 12:49:58 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libftm_vec.h"
+
+t_ftmvec *ftm_vecsub(t_ftmvec *dst, t_ftmvec *other)
+{
+ size_t i;
+
+ if (dst->size != other->size)
+ return (NULL);
+ i = 0;
+ while (i < dst->size)
+ {
+ dst->v[i] -= other->v[i];
+ i++;
+ }
+ return (dst);
+}