Skip to content

Instantly share code, notes, and snippets.

@mcky
Created March 17, 2014 02:12
Show Gist options
  • Save mcky/9592804 to your computer and use it in GitHub Desktop.
Save mcky/9592804 to your computer and use it in GitHub Desktop.
event = {
touches: [{
X: 100,
Y: 200
}, {
X: 300,
Y: 500
}]
};
pinchDistance = Math.sqrt(
(Math.pow((event.touches[0].X - event.touches[1].X),2)) +
(Math.pow((event.touches[0].Y - event.touches[1].Y),2))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment