From: Krzysztof K. <twe...@gm...> - 2014-07-19 00:40:39
|
This method is a little pointless, because it will return more than one point only if they are at exactly the same distance. Due to limited precision of doubles, this will only happen in very specific circumstances - basically only if someone deliberately constructs the object and the point with carefully chosen values. It's nearly impossible to get more than one result by manipulating shapes on the screen. Therefore arbitrarily picking one of the points doesn't change much. It would be more useful if the method accepted a tolerance parameter and returned the local minima of each subset of the shape not further than this tolerance from the true nearest time. The attached image explains this. Regards, Krzysztof |