svgAngle method
Implementation
double svgAngle(double ux, double uy, double vx, double vy) {
final dot = ux * vx + uy * vy;
final len = math.sqrt(ux * ux + uy * uy) * math.sqrt(vx * vx + vy * vy);
double ang = math.acos(math.max(
-1,
math.min(
1,
dot /
len))); // floating point precision, slightly over values appear
if ((ux * vy - uy * vx) < 0) ang = -ang;
return ang;
}