Created
August 14, 2014 07:56
-
-
Save Johnqing/982071f5fcf31cdc06eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isCoincide = function (a, b) { | |
var _XDif = Math.abs(a.x() - b.x()); | |
var _YDif = Math.abs(a.y() - b.y()); | |
return (_XDif <= a.width() && _YDif <= a.height()) || (_XDif <= b.width() && _YDif <= b.height()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment