DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AngleComputer.h
1 
17 #pragma once
18 
35 #if defined(AngleComputer_RECURSES)
36 #error Recursive header files inclusion detected in AngleComputer.h
37 #else // defined(AngleComputer_RECURSES)
38 
39 #define AngleComputer_RECURSES
40 
41 #if !defined AngleComputer_h
42 
43 #define AngleComputer_h
44 
46 // Inclusions
47 #include <iostream>
48 #include "DGtal/base/Common.h"
49 
50 #ifdef _MSC_VER
51 #if defined( max )
52 #undef max
53 #define _HAS_MSVC_MAX_ true
54 #endif
55 #if defined( min )
56 #undef min
57 #define _HAS_MSVC_MIN_ true
58 #endif
59 #endif
60 
62 
63 namespace DGtal
64 {
65 
69  struct AngleComputer
70  {
75  static float cast( float i );
76 
85  static bool less( float i, float j );
86 
94  static float posDiff( float j, float i );
95 
103  static float deviation( float j, float i );
104 
112  static float min( float i, float j );
113 
121  static float max( float i, float j );
122 
123 
128  static double cast( double i );
129 
138  static bool less( double i, double j );
139 
147  static double posDiff( double j, double i );
148 
156  static double deviation( double j, double i );
157 
165  static double min( double i, double j );
166 
174  static double max( double i, double j );
175 
176 
177  };
178 
179 
180 
181 
182 } // namespace DGtal
183 
184 
186 // Includes inline functions.
187 #include "DGtal/math/AngleComputer.ih"
188 
189 
190 // //
192 
193 #endif // !defined AngleComputer_h
194 
195 #undef AngleComputer_RECURSES
196 #endif // else defined(AngleComputer_RECURSES)