@studiometa/js-toolkit
Version:
A set of useful little bits of JavaScript to boost your project! 🚀
17 lines (16 loc) • 614 B
TypeScript
/**
* @typedef {Object} Circle
* @property {number} x Circle's x position
* @property {number} y Circle's y position
* @property {number} radius Circle's radius
*/
/**
* Test if a circle collides with another.
* Inspired by http://www.jeffreythompson.org/collision-detection/circle-circle.php
*
* @param {Circle} circle1 Circle 1
* @param {Circle} circle2 Circle 2
* @return {boolean} Are the sides of one circle touching the other ?
* @link https://js-toolkit.studiometa.dev/utils/collision/collideCircleCircle.html
*/
export declare function collideCircleCircle(circle1: any, circle2: any): boolean;