Skip to content

Commit

Permalink
add a basic readme, license, gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed May 16, 2017
1 parent ca329c3 commit ee12be3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
node_modules
tmp
*.log
yarn.lock
15 changes: 15 additions & 0 deletions LICENSE
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2017, Mapbox

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
6 changes: 6 additions & 0 deletions README.md
@@ -0,0 +1,6 @@
## delaunator

The fastest JavaScript library for
[Delaunay triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation) of 2D points.

A work in progress.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -185,16 +185,16 @@ Delaunay.prototype = {
var p0 = triangles[ar];
var pr = triangles[a];
var pl = triangles[al];
var p = triangles[bl];
var p1 = triangles[bl];

var illegal = inCircle(
coords[p0], coords[p0 + 1],
coords[pr], coords[pr + 1],
coords[pl], coords[pl + 1],
coords[p], coords[p + 1]);
coords[p1], coords[p1 + 1]);

if (illegal) {
triangles[a] = p;
triangles[a] = p1;
triangles[b] = p0;

this._link(a, adjacent[bl]);
Expand Down

0 comments on commit ee12be3

Please sign in to comment.