]> git.donarmstrong.com Git - ape.git/blobdiff - src/triangMtds.c
bunch of fixes for ape 3.0-2
[ape.git] / src / triangMtds.c
index 7ec0bd73d8b4922d81e4ef69809149df42d2b2d4..e6ad8efaeec096d171191b6aa34cbb71f972f896 100644 (file)
@@ -1,6 +1,6 @@
-/* triangMtds.c    2011-10-11 */
+/* triangMtds.c    2012-04-02 */
 
-/* Copyright 2011 Andrei-Alin Popescu */
+/* Copyright 2011-2012 Andrei-Alin Popescu */
 
 /* This file is part of the R-package `ape'. */
 /* See the file ../COPYING for licensing issues. */
@@ -188,7 +188,7 @@ void triangMtds(double* d, int* np, int* ed1,int* ed2, double* edLen)
               {
                 if((ed1[i]==aux && ed2[i]==p)||(ed2[i]==aux && ed1[i]==p))
                   {
-                    if(ed2[i]==aux && ed1[i]==p){sw=1;}
+                    if(ed1[i]==aux && ed2[i]==p){sw=1;}
                     subdiv=i;
                     sum+=edLen[i];
                   }