From 5fca79fc9e2848e23709d4579712af890e711e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sat, 22 Dec 2018 03:25:41 +0000 Subject: [PATCH] Using hypot for 2d norm Former-commit-id: eb0c5824286c4a56ab5ac068972d13a42aa78838 --- qpms/vectors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qpms/vectors.h b/qpms/vectors.h index 3557c4c..43168a3 100644 --- a/qpms/vectors.h +++ b/qpms/vectors.h @@ -35,7 +35,7 @@ static inline double cart2_normsq(const cart2_t a) { } static inline double cart2norm(const cart2_t v) { - return sqrt(v.x*v.x + v.y*v.y); + return hypot(v.x, v.y); //sqrt(v.x*v.x + v.y*v.y); } static inline pol_t cart2pol(const cart2_t cart) {