MCPcopy Create free account
hub / github.com/MyGUI/mygui / arcAngle

Function arcAngle

MyGUIEngine/src/msdfgen/ext/import-svg.cpp:98–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98static double arcAngle(Vector2 u, Vector2 v) {
99 return nonZeroSign(crossProduct(u, v))*acos(clamp(dotProduct(u, v)/(u.length()*v.length()), -1., +1.));
100}
101
102static Vector2 rotateVector(Vector2 v, Vector2 direction) {
103 return Vector2(direction.x*v.x-direction.y*v.y, direction.y*v.x+direction.x*v.y);

Callers 1

addArcApproximateFunction · 0.85

Calls 5

nonZeroSignFunction · 0.85
crossProductFunction · 0.85
clampFunction · 0.85
dotProductFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected