From 1a538226bbca40432d6a35046e627afeaf307fca Mon Sep 17 00:00:00 2001 From: johanengelen Date: Mon, 4 Aug 2008 20:22:06 +0000 Subject: [PATCH] NR:: => Geom:: for util dir --- src/util/mathfns.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/mathfns.h b/src/util/mathfns.h index 9f22ad11b..20c06145a 100644 --- a/src/util/mathfns.h +++ b/src/util/mathfns.h @@ -12,6 +12,7 @@ #ifndef SEEN_INKSCAPE_UTIL_MATHFNS_H #define SEEN_INKSCAPE_UTIL_MATHFNS_H +#include <2geom/point.h> namespace Inkscape { @@ -21,9 +22,11 @@ namespace Util { * Returns area in triangle given by points; may be negative. */ inline double -triangle_area (NR::Point p1, NR::Point p2, NR::Point p3) +triangle_area (Geom::Point p1, Geom::Point p2, Geom::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]); + using Geom::X; + using Geom::Y; + return (p1[X]*p2[Y] + p1[Y]*p3[X] + p2[X]*p3[Y] - p2[Y]*p3[X] - p1[Y]*p2[X] - p1[X]*p3[Y]); } /** -- 2.30.2