Closed dratchkov closed 2 years ago
Should've seen this sooner in the documentation. Duh.
The coordinate data type is a template parameter of all data types and algorithms provided by the library, and is expected to be integral. Floating point coordinate data types are not supported by the algorithms implemented in the library due to the fact that the achieving floating point robustness implies a different set of algorithms and generally platform specific assumptions about floating point representations.
See previous comment
Hi,
I am trying to the area of small rectangular polygon. For some reason
boost::polygon::area
return 0. Code sample is belowThe result of the above code is:
Is this a bug or I am missing a
#define
?Not knowing how useful this is: I did a little bit of debugging, stepping side by side through "good" and "bad" test cases. First, "clean"-inig the polygon produces different results. Seems like cleaning is done by running a boolean op with nothing, and then this code inside
boost/polygon/detail/scan_arbitrary.hpp
:Is the code assuming that the sequence
--x_
followed by++x_
will producex_
? In the casex_ = 0.003065
the final result is0.0030649999999999844