Talk:Convex hull: Difference between revisions

won't run
m (wrong for some definition of wrong.)
(won't run)
Line 128:
 
::::: I don't know, if your question is "which of these given points are on the hull?" than then the Raku implementation would be correct. I note that the task is somewhat vague in that regard. At any rate, if it offends you so, change the line <code>if ccw( |@h.tail(2), $point ) >= 0 {</code> to <code>if ccw( |@h.tail(2), $point ) > 0 {</code> and intermediate colinear points will not be reported. It doesn't bother me enough to change it. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 22:33, 29 December 2020 (UTC)
 
:::::: Apparently that's not legal Raku (I put the one = back in and it's fine again, took that one char out and it broke again, a real ??!!??WTF??!! moment):
Convex Hull (7 points): [(-3, -9) (19, -8) (17, 5) (12, 17) (5, 19) (-3, 15) (-9, -3)]
Too few positionals passed; expected 3 arguments but got 2
in sub ccw at ./main.raku line 7
in sub graham-scan at ./main.raku line 39
in block <unit> at ./main.raku line 57
 
exit status 1
:::::: The diagram at 1:00 of the Youtube link is very clear on this matter, plus it seems common sense to me that if the set is every pixel used to draw a 400x400 square, the convex hull is 4 points, not all 1,596. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 03:03, 30 December 2020 (UTC)
7,804

edits