From c17292fc068e26bbcefcc8778daa5cb07c82f065 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 2 Dec 2007 23:14:54 +0000 Subject: Fix compile. Don't #include .cpp files! (bzr r4157) --- src/nodepath.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/nodepath.cpp') diff --git a/src/nodepath.cpp b/src/nodepath.cpp index f48a83b4f..1239f961b 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -49,6 +49,7 @@ #include #include "live_effects/lpeobject.h" #include "live_effects/parameter/parameter.h" +#include "util/mathfns.h" class NR::Matrix; @@ -4046,15 +4047,6 @@ static void sp_nodepath_subpath_open(Inkscape::NodePath::SubPath *sp,Inkscape::N new_path->p.other = NULL; } -/** - * Returns area in triangle given by points; may be negative. - */ -inline double -triangle_area (NR::Point p1, NR::Point p2, NR::Point p3) -{ - return (p1[NR::X]*p2[NR::Y] + p1[NR::Y]*p3[NR::X] + p2[NR::X]*p3[NR::Y] - p2[NR::Y]*p3[NR::X] - p1[NR::Y]*p2[NR::X] - p1[NR::X]*p3[NR::Y]); -} - /** * Return new node in subpath with given properties. * \param pos Position of node. @@ -4079,7 +4071,7 @@ sp_nodepath_node_new(Inkscape::NodePath::SubPath *sp, Inkscape::NodePath::Node * // use the type from sodipodi:nodetypes n->type = type; } else { - if (fabs (triangle_area (*pos, *ppos, *npos)) < 1e-2) { + if (fabs (Inkscape::Util::triangle_area (*pos, *ppos, *npos)) < 1e-2) { // points are (almost) collinear if (NR::L2(*pos - *ppos) < 1e-6 || NR::L2(*pos - *npos) < 1e-6) { // endnode, or a node with a retracted handle -- cgit v1.2.3