Content deleted Content added
→Complexity: MOS:REFPUNCT |
Given a 0 indexed array, `PointList[end]` is out-of-bound and invalid. I think the correct index is `PointList[end - 1]` Tag: Reverted |
||
Line 28:
end = length(PointList)
'''for''' i = 2 to (end - 1) {
d = perpendicularDistance(PointList[i], Line(PointList[1], PointList[end - 1]))
'''if''' (d > dmax) {
index = i
|