fixed comparison eith edge angle.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 10 Jul 2006 11:11:17 +0000 (11:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 10 Jul 2006 11:11:17 +0000 (11:11 +0000)
source/blender/src/editmesh_mods.c

index 767f9f5aa9072f86a15eaa0da86b702171f6ed7f..ba6dce0001f5966c4500e46fd0233195c9fe7269 100644 (file)
@@ -965,7 +965,7 @@ int edgegroup_select(short mode)
                                else if (eed->f2==0) /* first access, assign the face */
                                        eed->tmp.f= efa;
                                else if (eed->f2==1) /* second, we assign the angle*/
-                                       eed->tmp.fp= VecAngle2(eed->tmp.f->n, efa->n);
+                                       eed->tmp.fp= VecAngle2(eed->tmp.f->n, efa->n)/180;
                                eed->f2++; /* f2==0 no face assigned. f2==1 one face found. f2==2 angle calculated.*/
                                j++;
                        }
@@ -1028,7 +1028,7 @@ int edgegroup_select(short mode)
                                                !(eed->f & SELECT) &&
                                                !eed->h &&
                                                eed->f2==2 &&
-                                               (SCALE_CMP(base_eed->tmp.fp, eed->tmp.fp))
+                                               (fabs(base_eed->tmp.fp-eed->tmp.fp)<=thresh)
                                        ) {
                                                EM_select_edge(eed, 1);
                                                selcount++;