1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3  *
4  * gimpcoords.h
5  * Copyright (C) 2002 Simon Budig  <simon@gimp.org>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __GIMP_COORDS_H__
22 #define __GIMP_COORDS_H__
23 
24 
25 void     gimp_coords_mix            (const gdouble     amul,
26                                      const GimpCoords *a,
27                                      const gdouble     bmul,
28                                      const GimpCoords *b,
29                                      GimpCoords       *ret_val);
30 void     gimp_coords_average        (const GimpCoords *a,
31                                      const GimpCoords *b,
32                                      GimpCoords       *ret_average);
33 void     gimp_coords_add            (const GimpCoords *a,
34                                      const GimpCoords *b,
35                                      GimpCoords       *ret_add);
36 void     gimp_coords_difference     (const GimpCoords *a,
37                                      const GimpCoords *b,
38                                      GimpCoords       *difference);
39 void     gimp_coords_scale          (const gdouble     f,
40                                      const GimpCoords *a,
41                                      GimpCoords       *ret_product);
42 
43 gdouble  gimp_coords_scalarprod     (const GimpCoords *a,
44                                      const GimpCoords *b);
45 gdouble  gimp_coords_length         (const GimpCoords *a);
46 gdouble  gimp_coords_length_squared (const GimpCoords *a);
47 gdouble  gimp_coords_manhattan_dist (const GimpCoords *a,
48                                      const GimpCoords *b);
49 
50 gboolean gimp_coords_equal          (const GimpCoords *a,
51                                      const GimpCoords *b);
52 
53 gdouble  gimp_coords_direction      (const GimpCoords *a,
54                                      const GimpCoords *b);
55 
56 
57 #endif /* __GIMP_COORDS_H__ */
58