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

parsegraph-extent

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parsegraph-extent

2D geometric container

1.4.16
latest
Source
npm
Version published
Maintainers
2
Created
Source

parsegraph-extent

This module provides a class to manage separation between graphs. It is intended to be used in a set, with one extent managing a specific axis and direction. Methods are provided to calculate the minimum distance needed to separate two extents, as well as methods to combine two extents into a single extent that covers both.

import Extent from 'parsegraph-extent'

const rootNode = new Extent();
const forwardNode = new Extent();

rootNode.appendLS(50, 25);
forwardNode.appendLS(12, 6);
const separation = rootNode.separation(forwardNode);

const combined = rootNode.combinedExtent(forwardNode, 0, separation);

const expected = new Extent();
expected.appendLS(12, separation + 6);
expected.appendLS(38, 25);

assert.ok(expected.equals(combined), "Combining extents does not work.");

FAQs

Package last updated on 01 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts