Socket
Socket
Sign inDemoInstall

bounding-box

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bounding-box

Determines the bounding box of some object.


Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Install size
4.60 kB
Created
Weekly downloads
 

Readme

Source

bounding box

Determine the bounding box of a rotated rectangle

Bounding Box

example

var bb = require('bounding-box')

var obj = {left: 221, top: 211, height: 220, width: 586}

console.log(bb(obj, 45))

With custom center point

var bb = require('bounding-box')

var obj = {left: 221, top: 211, height: 220, width: 586}

// Rotate from top/left corner (origin 0 0)
console.log(bb(obj, 45, {
  x: 221,
  y: 211
}))

install

With npm,

npm install bounding-box

license

BSD

Keywords

FAQs

Last updated on 15 Jun 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc