aboutsummaryrefslogtreecommitdiff
path: root/point.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-01-28 15:33:17 +0000
committerrodri <rgl@antares-labs.eu>2023-01-28 15:33:17 +0000
commit302a41f84da0884d1ac07d653868c7d0e7604362 (patch)
tree40e46d21437f9eb9bf38d2915185b8420c8c8112 /point.c
parentfdeaa2423c582df8d9e9ae6b0e26d386b5531262 (diff)
downloadlibgeometry-302a41f84da0884d1ac07d653868c7d0e7604362.tar.gz
libgeometry-302a41f84da0884d1ac07d653868c7d0e7604362.tar.bz2
libgeometry-302a41f84da0884d1ac07d653868c7d0e7604362.zip
made edgeptcmp public. implemented centroid for Triangle[23], and a homogeneous-to-barycentric coordinates conversion function for Triangle2.
Diffstat (limited to 'point.c')
-rw-r--r--point.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/point.c b/point.c
index 91634f0..0267c41 100644
--- a/point.c
+++ b/point.c
@@ -79,6 +79,11 @@ normvec2(Point2 v)
*
* Juan Pineda, “A Parallel Algorithm for Polygon Rasterization”,
* Computer Graphics, Vol. 22, No. 8, August 1988
+ *
+ * comparison of a point p with an edge [e0 e1]
+ * p to the right: +
+ * p to the left: -
+ * p on the edge: 0
*/
int
edgeptcmp(Point2 e0, Point2 e1, Point2 p)