New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turf/tin

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/tin - npm Package Compare versions

Comparing version 3.5.2 to 3.5.3

45

index.js

@@ -77,22 +77,11 @@ //http://en.wikipedia.org/wiki/Delaunay_triangulation

G = 2 * (A * (c.y - b.y) - B * (c.x - b.x)),
minx, miny, dx, dy;
dx, dy;
// If the points of the triangle are collinear, then just find the
// extremes and use the midpoint as the center of the circumcircle.
if (Math.abs(G) < 0.000001) {
minx = Math.min(a.x, b.x, c.x);
miny = Math.min(a.y, b.y, c.y);
dx = (Math.max(a.x, b.x, c.x) - minx) * 0.5;
dy = (Math.max(a.y, b.y, c.y) - miny) * 0.5;
this.x = minx + dx;
this.y = miny + dy;
this.r = dx * dx + dy * dy;
} else {
this.x = (D * E - B * F) / G;
this.y = (A * F - C * E) / G;
dx = this.x - a.x;
dy = this.y - a.y;
this.r = dx * dx + dy * dy;
}
this.x = (D * E - B * F) / G;
this.y = (A * F - C * E) / G;
dx = this.x - a.x;
dy = this.y - a.y;
this.r = dx * dx + dy * dy;
}

@@ -140,4 +129,12 @@

ymin = vertices[i].y,
ymax = ymin;
ymax = ymin,
epsilon = 1e-12;
var a,
b,
c,
A,
B,
G;
while (i--) {

@@ -180,3 +177,3 @@ if (vertices[i].y < ymin)

edges = [],
j, a, b;
j;

@@ -224,3 +221,11 @@ // Incrementally add each vertex to the mesh.

a = edges[--j];
open.push(new Triangle(a, b, vertices[i]));
c = vertices[i];
// Avoid adding colinear triangles (which have error-prone
// circumcircles)
A = b.x - a.x;
B = b.y - a.y;
G = 2 * (A * (c.y - b.y) - B * (c.x - b.x));
if (Math.abs(G) > epsilon) {
open.push(new Triangle(a, b, c));
}
}

@@ -227,0 +232,0 @@ }

{
"name": "@turf/tin",
"version": "3.5.2",
"version": "3.5.3",
"description": "turf tin module",

@@ -29,4 +29,4 @@ "main": "index.js",

"dependencies": {
"@turf/helpers": "^3.5.2"
"@turf/helpers": "^3.5.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc