-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvec.h
65 lines (50 loc) · 2.41 KB
/
vec.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
54
55
56
57
58
59
60
61
62
63
64
65
int vec_ini(real, real, real, /**/ real[3]);
int vec_get(int, const real[], const real[], const real[], /**/ real[3]);
int vec_get2(int i, int j, const real x[], const real y[], const real z[],
/**/ real[3], real[3]);
int vec_get3(int, int, int, const real[], const real[], const real[],
/**/ real[3], real[3], real[3]);
int vec_get4(int, int, int, int, const real[], const real[], const real[],
/**/ real[3], real[3], real[3], real[3]);
int vec_set(const real[3], int, /**/ real[], real[], real[]);
int vec_swap(int, int, /**/ real[], real[], real[]);
int vec_coord(const real[3], /**/ real *, real *, real *);
int vec_plus(const real[3], const real[3], /**/ real[3]);
int vec_minus(const real[3], const real[3], /**/ real[3]);
int vec_add(const real[3], /*io */ real[3]);
int vec_sub(const real[3], /*io */ real[3]);
/* y += a*x */
int vec_axpy(real a, const real x[3], /*io */ real y[3]);
int vec_neg( /*io */ real[3]);
/* al*a + be*b */
int vec_linear_combination(real, const real[3], real, const real[3],
/**/ real[3]);
int vec_scalar(const real[3], real, /**/ real[3]);
int vec_negative(const real[3], /**/ real[3]);
int vec_copy(const real[3], /**/ real[3]);
int vec_scale(real, /*io */ real[3]);
int vec_append(const real[3], int, /**/ real *, real *, real *);
int vec_substr(const real[3], int, /**/ real *, real *, real *);
int vec_scalar_append(const real[3], real, int, /**/ real *, real *,
real *);
real vec_dot(const real[3], const real[3]);
real vec_angle(const real[3], const real[3]);
real vec_abs(const real[3]);
int vec_cross(const real[3], const real[3], /**/ real[3]);
/* coordinate system */
real vec_cylindrical_r(const real[3]);
real vec_spherical_theta(const real[3]);
int vec_norm(const real[3], /**/ real[3]);
int vec_normalize(real[3]);
int vec_mean3(const real[3], const real[3], const real[3], /**/ real[3]);
/* `c' = project `a' on `b' */
int vec_project(const real[3], const real[3], /**/ real[3]);
real vec_project_scalar(const real[3], const real[3]);
/* `c' = reject`a' on `b' */
int vec_reject(const real[3], const real[3], /**/ real[3]);
real vec_reject_scalar(const real[3], const real[3]);
int vec_fprintf(const real[3], FILE *, const char *fmt);
int vec_fprintf0(const real[3], FILE *, const char *fmt);
int vec_printf(const real[3], const char *fmt);
int vec_argv(const char **pq[], /**/ real[3]);
int vec_zero( /**/ real[3]);