Last active
May 6, 2016 17:02
-
-
Save marisusis/1e844c97e7353af381de227b7455c538 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function colCheck(a,b) { | |
var acx = a.w/2 + a.x, | |
acy = a.h/2 + a.y, | |
bcx = b.w/2 + b.x, | |
bcy = b.h/2 + b.y; | |
var w = (a.w + b.w)/2, | |
h = (a.h + b.h)/2, | |
dx = (acx - bcx), | |
dy = (acy - bcy); | |
if (a.w >= b.w) { | |
return 'yes'; | |
} else { | |
return 'not'; | |
} | |
} | |
var obja = {x:0,y:0,w:20,h:30}, | |
objb = {x:20,y:38,w:20,y:20}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment