MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / lerp

Function lerp

src/tailwind/Components/DecayCard/DecayCard.jsx:22–22  ·  view source on GitHub ↗
(a, b, n)

Source from the content-addressed store, hash-verified

20
21 useEffect(() => {
22 const lerp = (a, b, n) => (1 - n) * a + n * b;
23 const map = (x, a, b, c, d) => ((x - a) * (d - c)) / (b - a) + c;
24 const distance = (x1, x2, y1, y2) => Math.hypot(x1 - x2, y1 - y2);
25

Callers 1

renderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected