MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / hitTest

Function hitTest

assets/js/newyearwish.js:9–9  ·  view source on GitHub ↗
(x1, y1, w1, h1, x2, y2, w2, h2)

Source from the content-addressed store, hash-verified

7var self = this;
8var rand = function(rMi, rMa){return ~~((Math.random()*(rMa-rMi+1))+rMi);}
9var hitTest = function(x1, y1, w1, h1, x2, y2, w2, h2){return !(x1 + w1 < x2 || x2 + w2 < x1 || y1 + h1 < y2 || y2 + h2 < y1);};
10window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();
11
12self.init = function(){

Callers 1

FireworksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected