DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Transforms.ih
1 /* -*- mode: c++ -*- */
9 /*
10  * \@copyright This File is part of the Board library which is
11  * licensed under the terms of the GNU Lesser General Public Licence.
12  * See the LICENCE file for further details.
13  */
14 #if defined( max )
15 #undef max
16 #define _HAS_MSVC_MAX_ true
17 #endif
18 
19 
20 Transform::Transform()
21  : _scale(1.0), _deltaX(0.0), _deltaY(0.0), _height(0.0)
22 { }
23 
24 TransformFIG::TransformFIG()
25  : _maxDepth(std::numeric_limits<int>::max()),_minDepth(0)
26 { }
27 
28 
29 double Transform::round( const double & x )
30 {
31  return std::floor( x + 0.5 );
32 }
33 
34 #if defined( _HAS_MSVC_MAX_ )
35 #define max(A,B) ((A)>(B)?(A):(B))
36 #endif