0.0.2 • Published 8 years ago

collides v0.0.2

Weekly downloads
3
License
CC0-1.0
Repository
github
Last release
8 years ago

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)