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

dgeoutils

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgeoutils - npm Package Compare versions

Comparing version 2.4.40 to 2.4.41

1

dist/cjs/DPolygon.d.ts

@@ -49,2 +49,3 @@ /// <reference types="offscreencanvas" />

get area(): number;
get filledDeintersection(): DPolygon;
get deintersection(): DPolygon;

@@ -51,0 +52,0 @@ get valid(): boolean;

@@ -226,2 +226,31 @@ import { DPoint } from './DPoint';

}
get filledDeintersection() {
const p = this.clone().deintersection.removeDuplicates().clockWise.open();
const findSameCorners = (startIndex = 0) => {
const store = {};
for (let i = startIndex; i < p.length; i++) {
const key = p.at(i).toString();
if (typeof store[key] === 'number') {
return [store[key], i];
}
store[key] = i;
}
return undefined;
};
let indexes = findSameCorners();
const holes = [];
while (indexes) {
const a = new DPolygon(p.clone().removePart(indexes[0], indexes[1] - indexes[0]));
if (a.isClockwise) {
indexes = findSameCorners(indexes[0] + 1);
}
else {
holes.push(a.close());
p.removePart(indexes[0], indexes[1] - indexes[0]);
indexes = findSameCorners();
}
}
p.holes = holes;
return p.close();
}
get deintersection() {

@@ -228,0 +257,0 @@ let p = this.clone().close();

2

package.json
{
"name": "dgeoutils",
"version": "2.4.40",
"version": "2.4.41",
"description": "Geometries utils for my projects",

@@ -5,0 +5,0 @@ "scripts": {

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

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

Sorry, the diff of this file is not supported yet

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