blob: e776d219ab1cccd5f1fdebd346f3df53bded72c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ftm_vecadd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/11 12:39:47 by charles #+# #+# */
/* Updated: 2020/05/11 12:39:49 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftm_vec.h"
t_ftmvec *ftm_vecadd(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);
}
|