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
| /*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
| that detects and handles AJAXed content. | |
| Usage example: | |
| waitForKeyElements ( | |
| "div.comments" | |
| , commentCallbackFunction | |
| ); |
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
| --[[ | |
| moves rectangle A by (dx, dy) and checks for a collision | |
| with rectangle B. | |
| if no collision occurs, returns false. | |
| if a collision does occur, returns: | |
| - the time within the movement when the collision occurs (from 0-1) | |
| - the x component of the normal vector | |
| - the y component of the normal vector |