Catalog npm
Back to packageRELEASE DETAILS

1.0.0

npm

2d-bounds

barebones array based 2d bounds compute

2daabbarraysboundspointspolyline
Published19 Apr 2015
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

2d-bounds

barebones array based 2d bounds compute

install

npm install 2d-bounds

use

bounds2(points [, out])

  • points - array of 2+ item arrays (i.e. [[0, 0], [1, 1]]) representing an array of 2d vectors
  • out - avoid creating garbage by reusing an array

returns out which is a 4 component array: [lowX, lowY, hiX, hiY]

example

var bounds2 = require('2d-bounds');

var polyline = [
  [-100, 100],
  [0, 0],
  [10, 200]
];

var b = bounds2(polyline);

console.log(b);
// outputs: [ -100, 0, 10, 200 ]

license

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
tape
Environment
{
  "local_name": "tape",
  "alias": false,
  "peer_metadata": null
}
^4.0.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "1475604e25aa7a1607d8bbfd42589fa697920cd0",
  "tarball": "https://registry.npmjs.org/2d-bounds/-/2d-bounds-1.0.0.tgz",
  "integrity": "sha512-0XEbD8Rb0jbSxnwWyKKaMQdvT5eZIh9mmKRm0Meh5Fdu2J3cx7DnThiHZmhsPhGCxrfZeEh4LDYmfYv4OwR3CQ==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQCKUJOVua0g6UV+pJ1VYtMMVp5a97rWJ7JVx4IYUP/BbAIgK1m1sUYfZSYee3DTLlTxzJ+Ur2JMrc4Qbwnkou9SQQk="
    }
  ]
}

Repository

PENDING
tmpvar/2d-bounds

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:56713a6655cbcd30d71d977b975d83beec34737a5c5da944c713e9ee6dc4f92e

Other collected versions

View all collected versions →