From fc8db35aeda8d2bc02a023b9ebcd8b8cddadcbed Mon Sep 17 00:00:00 2001 From: tlatorre Date: Wed, 14 Nov 2018 15:14:17 -0600 Subject: speed up get_path_length() by not computing the norm twice --- src/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index d5667e8..3c004e4 100644 --- a/src/misc.c +++ b/src/misc.c @@ -253,7 +253,7 @@ void get_path_length(double *pos1, double *pos2, double R, double *l1, double *l l = NORM(dir); - normalize(dir); + DIV(dir,l); b = 2*DOT(dir,pos1); c = DOT(pos1,pos1) - R*R; -- cgit