collides

0.0.2 • Public • Published

Collides

Collision test for two polygons

Installation

$ npm install --save collides

Usage

var collides = require('collides');

collides(
  {
    x: 1,
    y: 1,
    width: 1,
    height: 1
  }, {
    x: 1,
    y: 2,
    width: 1,
    height: 1.1,
  }
) // => true

collides(
  {
    x: 1,
    y: 1,
    width: 1,
    height: 1
  }, {
    x: 1,
    y: 2,
    width: 1,
    height: 1,
  }
) // => false

TBA

  • Generic polygon collisions

License

This code is released under CC0 (Public Domain)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i collides

Weekly Downloads

1

Version

0.0.2

License

CC0-1.0

Last publish

Collaborators

  • nihey