summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 386aac0)
raw | patch | inline | side by side (parent: 386aac0)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 4 Aug 2008 20:22:06 +0000 (20:22 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 4 Aug 2008 20:22:06 +0000 (20:22 +0000) |
src/util/mathfns.h | patch | blob | history |
diff --git a/src/util/mathfns.h b/src/util/mathfns.h
index 9f22ad11b0568ff631e4b0d1169597e3f703a5c8..20c06145a190dd747e6ffda5c71534a4d58c7424 100644 (file)
--- a/src/util/mathfns.h
+++ b/src/util/mathfns.h
#ifndef SEEN_INKSCAPE_UTIL_MATHFNS_H
#define SEEN_INKSCAPE_UTIL_MATHFNS_H
+#include <2geom/point.h>
namespace Inkscape {
* 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]);
}
/**