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)

Package Sidebar

Install

npm i collides

Weekly Downloads

5

Version

0.0.2

License

CC0-1.0

Last publish

Collaborators

  • nihey