#49 : Validate tap event

This commit is contained in:
Vadim
2021-08-06 23:12:13 +03:00
parent b66ab30a0d
commit 094ed0894e
3 changed files with 38 additions and 4 deletions

6
src/utils/math.js Normal file
View File

@@ -0,0 +1,6 @@
export const getDistance = (p1, p2) => {
const x = p2.x - p1.x;
const y = p2.y - p1.y;
return Math.sqrt((x * x) + (y * y));
}