Talk:Convex hull: Difference between revisions

m
wrong for some definition of wrong.
m (and Sidef)
m (wrong for some definition of wrong.)
Line 126:
:::: I had the same problem with my Phix translation of the C code, however I <u>only</u> needed to add the fogotten t.
:::: I also added more tests and a simple plot for visual verification of the results. I will also point out that the Raku (and therefore also Sidef) output is wrong in that the (1,-9) of (-3, -9) (1, -9) (14, -9) is clearly colinear and therefore should not be part of the hull. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 19:19, 24 December 2020 (UTC)
 
::::: 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)
10,327

edits