Guest User

Untitled

a guest
May 26th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function ongoingTouchIndexById(idToFind) {
  2. for (let i = 0; i < ongoingTouches.length; i++) {
  3. const id = ongoingTouches[ i ].identifier;
  4.  
  5. if (id == idToFind) {
  6. return i;
  7. }
  8. }
  9. return -1; // not found
  10. }
Add Comment
Please, Sign In to add comment