Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DavidHDev/react-bits
/ getMouseDistance
Function
getMouseDistance
src/tailwind/Animations/ImageTrail/ImageTrail.jsx:23–27 ·
view source on GitHub ↗
(p1, p2)
Source
from the content-addressed store, hash-verified
21
};
22
}
23
function getMouseDistance(p1, p2) {
24
const dx = p1.x - p2.x;
25
const dy = p1.y - p2.y;
26
return Math.hypot(dx, dy);
27
}
28
29
class ImageItem {
30
DOM = { el: null, inner: null };
Callers
8
render
Method · 0.70
render
Method · 0.70
render
Method · 0.70
render
Method · 0.70
render
Method · 0.70
render
Method · 0.70
render
Method · 0.70
render
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected