Skip to content

Instantly share code, notes, and snippets.

@thinsoldier
Created October 26, 2015 02:43
Show Gist options
  • Save thinsoldier/67a1af34789fe5b7d714 to your computer and use it in GitHub Desktop.
Save thinsoldier/67a1af34789fe5b7d714 to your computer and use it in GitHub Desktop.
var reportMouse = function(x,y)
{
text("x: "+ mouseX +" y: "+mouseY, x, y);
};
var pointWithinRect = function(pointX, pointY, x, y, w, h)
{
if(pointX > x && pointX < x+w && pointY > y && pointY < y+h)
{return true;} else {return false;}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment