Skip to main content
7 events
when toggle format what by license comment
S Nov 19, 2011 at 18:30 history suggested CommunityBot CC BY-SA 3.0
minimum search optimized
Nov 19, 2011 at 13:50 review Suggested edits
S Nov 19, 2011 at 18:30
Nov 18, 2011 at 10:15 comment added RomanSt Nice pic, but the algorithm suggested doesn't deserve any of the upvotes this answer has received.
Nov 16, 2011 at 10:25 comment added sam hocevar This answer is incredibly complicated for such a simple problem. There is no need to use linear search when the minimal value can be calculated directly.
Nov 16, 2011 at 4:41 comment added Ilmari Karonen You can do better than that: if abs(Tx-Sx) < Wx/2, then i=0 is optimal; otherwise the optimal choice is i=-1 or i=1, depending on the sign of Tx-Sx. Same goes for Ty-Sy and j.
Nov 16, 2011 at 1:59 history migrated from stackoverflow.com (revisions)
Nov 15, 2011 at 15:48 history answered kol CC BY-SA 3.0