Using hypot for 2d norm

Former-commit-id: eb0c5824286c4a56ab5ac068972d13a42aa78838
This commit is contained in:
Marek Nečada 2018-12-22 03:25:41 +00:00
parent 328d22de89
commit 5fca79fc9e
1 changed files with 1 additions and 1 deletions

View File

@ -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) {