The function hypot is available in C99 and has the potential to compute the same
operation more efficiently and with greater precision.
#include <string.h>
#include <ctype.h>
#include <locale.h>
+#include <math.h>
#include <common/render.h>
#include <cgraph/agxbuf.h>
#include <common/htmltable.h>
double len;
double x = q.x - r.x, y = q.y - r.y;
- len = sqrt(x * x + y * y);
+ len = hypot(x, y);
if (len < EPSILON) {
/* control points are on top of each other
use slope between endpoints instead */