Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function testCollision(v, index) {
- if (test(p.x, p.y, p.breath, p.length, v.x, v.y, v.radius)) {
- ball.splice(index, 1);
- n--;
- //splice starts deleting the elements of array from the index given in the first parameter
- // and the second parameter accepts the no. of array elements to be deleted
- }
- }
Add Comment
Please, Sign In to add comment