MCPcopy
hub / github.com/methodofaction/Method-Draw / r

Function r

src/js/lib/canvg.js:1350–1350  ·  view source on GitHub ↗
(u, v)

Source from the content-addressed store, hash-verified

1348 var m = function(v) { return Math.sqrt(Math.pow(v[0],2) + Math.pow(v[1],2)); }
1349 // ratio between two vectors
1350 var r = function(u, v) { return (u[0]*v[0]+u[1]*v[1]) / (m(u)*m(v)) }
1351 // angle between two vectors
1352 var a = function(u, v) { return (u[0]*v[1] < u[1]*v[0] ? -1 : 1) * Math.acos(r(u,v)); }
1353 // initial angle

Callers 3

aFunction · 0.85
buildFunction · 0.85

Calls 1

mFunction · 0.70

Tested by

no test coverage detected