ConvexHull icon indicating copy to clipboard operation
ConvexHull copied to clipboard

Corrected a couple of errors

Open jlhonora opened this issue 11 years ago • 2 comments

Hi,

When using the example code I discovered two details that I've corrected:

  1. The point sorting was being done in the incorrect order. (Y must be sorted after X).
  2. The last element of the hullPoints array should be removed in order to plot a correct convex hull.

I also added a simple .html example to play with, it shows two polylines, one with the old example and one with the new one.

Cheers! Jose

jlhonora avatar Jun 11 '13 19:06 jlhonora

Thanks for the changes, Jose! I will take this opportunity to clean up the docs as well.

I have a question though, why did you rename the variable top to ttop in the js?

mgomes avatar Jun 11 '13 23:06 mgomes

Hi Mauricio, thanks for the quick follow up. It was highlighted as a special keyword in vim. Since I'm no expert in JavaScript I thought that maybe that could rise some kind of error, but the name 'top' should work perfectly.

Thanks for the library, it was very useful!! Jose

Sent from a mobile device

On Jun 11, 2013, at 7:09 PM, Mauricio Gomes [email protected] wrote:

Thanks for the changes, Jose! I will take this opportunity to clean up the docs as well.

I have a question though, why did you rename the variable top to ttop in the js?

— Reply to this email directly or view it on GitHub.

jlhonora avatar Jun 11 '13 23:06 jlhonora