blob: 274cfb8e9a7253811bfb1ef212b749b914ccf671 (
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
29
30
|
#ifndef VECTOR
#define VECTOR
typedef struct Vector {
int mx;
int my;
} vector_t;
vector_t init_vector(int mx, int my);
int vector_equals(vector_t v1, vector_t v2);
vector_t vector_add(vector_t v1, vector_t v2);
vector_t vector_sub(vector_t v1, vector_t v2);
typedef struct VectorP {
vector_t *vectors;
int length;
} vectorp_t;
vectorp_t init_vectorp(vector_t * vectors, int length);
/* removes a vector from vectorp */
vectorp_t remove_vector(vectorp_t vectorp, int index);
vectorp_t remove_vectors(vectorp_t vectorp, int *indexes, int indexCount);
typedef struct VectorPP {
vectorp_t *vectorps;
int length;
} vectorpp_t;
vectorpp_t init_vectorpp(vectorp_t * vectorps, int length);
#endif
|