MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / angleBetweenVectors

Function angleBetweenVectors

source/vector.js:35–40  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

33};
34
35export const angleBetweenVectors = (a, b) => {
36 const displacement = subtractVector(a, b);
37 const [dx, dy] = displacement;
38 const angle = Math.atan2(dy, dx);
39 return angle;
40};

Callers 1

Calls 1

subtractVectorFunction · 0.85

Tested by

no test coverage detected