-
Notifications
You must be signed in to change notification settings - Fork 3
/
vectors.h
53 lines (48 loc) · 1.8 KB
/
vectors.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vectors.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/02/03 10:00:44 by appinha #+# #+# */
/* Updated: 2021/02/07 09:26:24 by apuchill ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef VECTORS_H
# define VECTORS_H
/*
** -.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-
** HEADERS
*/
# include <math.h>
/*
** -.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-
** STRUCT DECLARATIONS
*/
typedef struct s_coord
{
double x;
double y;
double z;
} t_coord;
/*
** -.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-.-'-
** FUNCTION PROTOTYPES
*/
/*
** FILE: vectors.c
*/
t_coord gen_coord(double x, double y, double z);
double v_len_sqr(t_coord v);
double v_len(t_coord v);
t_coord v_norm(t_coord v);
/*
** FILE: vectors_oper.c
*/
t_coord v_add(t_coord v, t_coord u);
t_coord v_sub(t_coord v, t_coord u);
t_coord v_scale(t_coord v, double f);
t_coord v_cross(t_coord v, t_coord u);
double v_dot(t_coord v, t_coord u);
#endif