Opened 5 years ago

#13421 new Bugs

boost::polygon::euclidean_distance(segment, point) returns 0 if the segment is of length 0

Reported by: daniel@… Owned by: Lucanus Simonson
Milestone: To Be Determined Component: polygon
Version: Boost 1.65.0 Severity: Problem
Keywords: Cc:

Description

On line 658 of segment_concept.hpp it returns 0 if the length of the segment (squared) is 0. It should just return the distance to one of the endpoints instead.

In such a case param is also 0 which is why we end up there.

Change History (0)

Note: See TracTickets for help on using tickets.