Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DavidHDev/react-bits
/ getMouseDistance
Function
getMouseDistance
src/content/Animations/ImageTrail/ImageTrail.jsx:25–29 ·
view source on GitHub ↗
(p1, p2)
Source
from the content-addressed store, hash-verified
23
};
24
}
25
function getMouseDistance(p1, p2) {
26
const dx = p1.x - p2.x;
27
const dy = p1.y - p2.y;
28
return Math.hypot(dx, dy);
29
}
30
31
class ImageItem {
32
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