Using hypot for 2d norm
Former-commit-id: eb0c5824286c4a56ab5ac068972d13a42aa78838
This commit is contained in:
parent
328d22de89
commit
5fca79fc9e
|
@ -35,7 +35,7 @@ static inline double cart2_normsq(const cart2_t a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline double cart2norm(const cart2_t v) {
|
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) {
|
static inline pol_t cart2pol(const cart2_t cart) {
|
||||||
|
|
Loading…
Reference in New Issue