boostorg / polygon

Boost.org polygon module
http://boost.org/libs/polygon
57 stars 70 forks source link

polygon::intersect(rectA, rectB, consider_touch) doesn't actually pass consider_touch to the intersection-check #82

Open nmz787-intel opened 2 years ago

nmz787-intel commented 2 years ago

function is: boost::polygon::intersect(T1& a, const T2& b, bool consider_touch = true)

docs on the function: https://www.boost.org/doc/libs/1_64_0/libs/polygon/doc/gtl_rectangle_concept.htm

bug where the bool isn't passed to the actual intersection-check is: https://github.com/boostorg/polygon/blob/8ba35b57c1436c4b36f7544aadd78c2b24acc7db/include/boost/polygon/rectangle_concept.hpp#L645

fix: change if(intersects(rectangle, b)) { to: if(intersects(rectangle, b, consider_touch)) {