summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef91a36)
raw | patch | inline | side by side (parent: ef91a36)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 14 Jul 2008 21:11:34 +0000 (21:11 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 14 Jul 2008 21:11:34 +0000 (21:11 +0000) |
src/helper/geom-nodetype.cpp | patch | blob | history |
index fa01a0bcb19ac4d85d0bacdaecded5e58e30cf24..1983fd42c13a565788dc8c56d7ae340ca1182ce4 100644 (file)
return NODE_SMOOTH;
}
- double const angle1 = Geom::atan2(-deriv1[n1]);
- double const angle2 = Geom::atan2(deriv2[n2]);
-
- if ( !are_near(angle1, angle2) )
- return NODE_CUSP; // derivatives are not colinear
+ if ( are_near( Geom::cross(deriv1[n1], deriv2[n2]), 0) && (Geom::dot(-deriv1[n1], deriv2[n2]) > 0) ) {
+ // Apparently, the derivatives are colinear and in same direction but does the order of the derivatives match?
+ if (n1 != n2)
+ return NODE_SMOOTH;
+ else
+ return NODE_SYMM;
+ }
- // Apparently, the derivatives are colinear but does the order of the derivatives match?
- if (n1 != n2)
- return NODE_SMOOTH;
- else
- return NODE_SYMM;
+ return NODE_CUSP;
}
}