upgrading copyright year from 2015 to 2016
[hkl.git] / hkl / hkl-vector-private.h
blob4a75065ed07734863d5ac5f0c5e52f7d764e3e06
1 /* This file is part of the hkl library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2003-2016 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
22 #ifndef __HKL_VECTOR_PRIVATE_H__
23 #define __HKL_VECTOR_PRIVATE_H__
25 #include <stdio.h> // for FILE
26 #include "hkl.h" // for G_BEGIN_DECLS, etc
28 G_BEGIN_DECLS
30 HklVector* hkl_vector_dup(const HklVector* self);
32 void hkl_vector_free(HklVector* self);
34 extern void hkl_vector_init(HklVector *self, double x, double y, double z);
36 extern void hkl_vector_fprintf(FILE *file, const HklVector *self);
38 extern int hkl_vector_cmp(const HklVector *self, const HklVector *vector);
40 extern int hkl_vector_is_opposite(const HklVector *self,
41 const HklVector *vector);
43 extern void hkl_vector_add_vector(HklVector *self, const HklVector *vector);
45 extern void hkl_vector_minus_vector(HklVector *self, const HklVector *vector);
47 extern void hkl_vector_div_double(HklVector *self, const double d);
49 extern void hkl_vector_times_double(HklVector *self, const double d);
51 extern void hkl_vector_times_vector(HklVector *self, const HklVector *vector);
53 extern void hkl_vector_times_matrix(HklVector *self, const HklMatrix *m);
55 extern double hkl_vector_sum(const HklVector *self);
57 extern double hkl_vector_scalar_product(const HklVector *self,
58 const HklVector *vector);
60 extern void hkl_vector_vectorial_product(HklVector *self,
61 const HklVector *vector);
63 extern double hkl_vector_angle(const HklVector *self,
64 const HklVector *vector);
66 extern double hkl_vector_oriented_angle(const HklVector *self,
67 const HklVector *vector,
68 const HklVector *ref);
70 extern double hkl_vector_oriented_angle_points(const HklVector *self,
71 const HklVector *p2,
72 const HklVector *p3,
73 const HklVector *ref);
75 extern double hkl_vector_norm2(const HklVector *self);
77 extern int hkl_vector_normalize(HklVector *self);
79 extern int hkl_vector_is_colinear(const HklVector *self,
80 const HklVector *vector);
82 extern void hkl_vector_randomize(HklVector *self);
84 extern void hkl_vector_randomize_vector(HklVector *self,
85 const HklVector *vector);
87 extern void hkl_vector_randomize_vector_vector(HklVector *self,
88 const HklVector *vector1,
89 const HklVector *vector2);
91 extern void hkl_vector_rotated_around_vector(HklVector *self,
92 const HklVector *axe,
93 double angle);
95 extern void hkl_vector_rotated_quaternion(HklVector *self,
96 const HklQuaternion *qr);
98 extern void hkl_vector_rotated_around_line(HklVector *self, double angle,
99 const HklVector *c1, const HklVector *c2);
101 extern int hkl_vector_is_null(const HklVector *self);
103 extern void hkl_vector_project_on_plan(HklVector *self,
104 const HklVector *normal);
106 extern void hkl_vector_project_on_plan_with_point(HklVector *self,
107 const HklVector *normal,
108 const HklVector *point);
110 G_END_DECLS
112 #endif