Skip to content

Instantly share code, notes, and snippets.

View said-and-done's full-sized avatar

Said Nuh said-and-done

  • @tv2 Editorial Dev Team
  • Copenhagen, Denmark
View GitHub Profile
@said-and-done
said-and-done / douglasPeucker.js
Created May 6, 2021 08:00 — forked from adammiller/douglasPeucker.js
Javascript implementation of the Douglas Peucker path simplification algorithm
var simplifyPath = function( points, tolerance ) {
// helper classes
var Vector = function( x, y ) {
this.x = x;
this.y = y;
};
var Line = function( p1, p2 ) {
this.p1 = p1;