Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flatten-js/core

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flatten-js/core - npm Package Compare versions

Comparing version 1.2.11 to 1.2.12

2

package.json
{
"name": "@flatten-js/core",
"version": "1.2.11",
"version": "1.2.12",
"description": "Javascript library for 2d geometry",

@@ -5,0 +5,0 @@ "main": "dist/main.cjs.js",

@@ -141,5 +141,7 @@ "use strict";

let dist_and_segment = [];
dist_and_segment.push(Distance.point2segment(seg2.start, seg1));
dist_and_segment.push(Distance.point2segment(seg2.end, seg1));
let dist_tmp, shortest_segment_tmp
[dist_tmp, shortest_segment_tmp] = Distance.point2segment(seg2.start, seg1);
dist_and_segment.push([dist_tmp, shortest_segment_tmp.reverse()]);
[dist_tmp, shortest_segment_tmp] = Distance.point2segment(seg2.end, seg1);
dist_and_segment.push([dist_tmp, shortest_segment_tmp.reverse()]);
dist_and_segment.push(Distance.point2segment(seg1.start, seg2));

@@ -146,0 +148,0 @@ dist_and_segment.push(Distance.point2segment(seg1.end, seg2));

@@ -310,2 +310,16 @@ /**

});
it('distanceTo between Polygons: First point of segment is not always on the this polygon #57', function () {
"use strict";
let rec1 = new Box(0, 0, 200, 50);
let rec2 = new Box(0, 500, 200, 550);
const p1 = new Polygon(rec1);
const p2 = new Polygon(rec2);
let [dist, shortest_segment] = p1.distanceTo(p2);
expect(dist).to.equal(450);
expect(shortest_segment.ps).to.deep.equal({"x": 200, "y": 50});
expect(shortest_segment.pe).to.deep.equal({"x": 200, "y": 500});
});
it('Can add new vertex to face and split edge of polygon (segment)', function () {

@@ -312,0 +326,0 @@ "use strict";

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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