File: src/collision/SAT.js
/**
* This module has now been replaced by `Matter.Collision`.
*
* All usage should be migrated to `Matter.Collision`.
* For back-compatibility purposes this module will remain for a short term and then later removed in a future release.
*
* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem.
*
* @class SAT
* @deprecated
*/
var SAT = {};
module.exports = SAT;
var Collision = require('./Collision');
var Common = require('../core/Common');
var deprecated = Common.deprecated;
(function() {
/**
* Detect collision between two bodies using the Separating Axis Theorem.
* @deprecated replaced by Collision.collides
* @method collides
* @param {body} bodyA
* @param {body} bodyB
* @return {collision} collision
*/
SAT.collides = function(bodyA, bodyB) {
return Collision.collides(bodyA, bodyB);
};
deprecated(SAT, 'collides', 'SAT.collides ➤ replaced by Collision.collides');
})();