aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-11-14 15:14:17 -0600
committertlatorre <tlatorre@uchicago.edu>2018-11-14 15:14:17 -0600
commitfc8db35aeda8d2bc02a023b9ebcd8b8cddadcbed (patch)
tree317da14d4099e583028ef170a85510e6f3e35d0b /src/misc.c
parent35cea408335aba4017ed9731f676a01d3e27d204 (diff)
downloadsddm-fc8db35aeda8d2bc02a023b9ebcd8b8cddadcbed.tar.gz
sddm-fc8db35aeda8d2bc02a023b9ebcd8b8cddadcbed.tar.bz2
sddm-fc8db35aeda8d2bc02a023b9ebcd8b8cddadcbed.zip
speed up get_path_length() by not computing the norm twice
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c2
1 files changed, 1 insertions, 1 deletions
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;