pcc

point-circle-collision

test for point-circle intersection

Showing:

Popularity

Downloads/wk

27

GitHub Stars

6

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

point-circle-collision

stable

Performs a point-circle collision test, returning true if they intersect.

var collide = require('point-circle-collision')

var circle = [5, 5],
    radius = 25,
    point = [5, 6]

var hit = collide(point, circle, radius)
console.log(hit)

You may also be interested in:

Usage

NPM

collide(point, circle, radius)

Performs a collision test with the given parameters. Returns true if collision occurred.

Point and circle are expected to be 2D vectors in the form of an array.

If the radius is zero, this test will return false.

License

MIT, see LICENSE.md for details.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100