summaryrefslogtreecommitdiffstats
path: root/src/line-geometry.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-26 17:56:46 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-26 17:56:46 +0000
commit59e792a6ebbacb1ddaba1d9825772a75805cc6ab (patch)
treec808a8882712250463c67c7230d60bdd578b5f18 /src/line-geometry.cpp
parentRewrite of z-order code for 3D boxes, first stage (hopefully this is finally ... (diff)
downloadinkscape-59e792a6ebbacb1ddaba1d9825772a75805cc6ab.tar.gz
inkscape-59e792a6ebbacb1ddaba1d9825772a75805cc6ab.zip
Various small cleanups
(bzr r3587)
Diffstat (limited to 'src/line-geometry.cpp')
-rw-r--r--src/line-geometry.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/line-geometry.cpp b/src/line-geometry.cpp
index 000da8a07..549defb2e 100644
--- a/src/line-geometry.cpp
+++ b/src/line-geometry.cpp
@@ -121,9 +121,14 @@ bool lies_in_sector (NR::Point const &v1, NR::Point const &v2, NR::Point const &
return (coords.first >= 0 and coords.second >= 0);
}
-static double pos_angle (NR::Point A, NR::Point B)
+bool lies_in_quadrangle (NR::Point const &A, NR::Point const &B, NR::Point const &C, NR::Point const &D, NR::Point const &pt)
{
- return fabs (NR::atan2 (A) - NR::atan2 (B));
+ return (lies_in_sector (D - A, B - A, pt - A) && lies_in_sector (D - C, B - C, pt - C));
+}
+
+static double pos_angle (NR::Point v, NR::Point w)
+{
+ return fabs (NR::atan2 (v) - NR::atan2 (w));
}
/*