aboutsummaryrefslogtreecommitdiff
path: root/ptintriangle.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-02-01 12:48:36 +0000
committerrodri <rgl@antares-labs.eu>2023-02-01 12:48:36 +0000
commit88a2aed0c2c5450437bd7935eb5847dfdfa50d59 (patch)
treebca357b5615e7c32ece16542d7452e850a76a3ca /ptintriangle.c
parent367b5a4c7a7ca100e55bf214471cdaabae0a2014 (diff)
downloadetoys-88a2aed0c2c5450437bd7935eb5847dfdfa50d59.tar.gz
etoys-88a2aed0c2c5450437bd7935eb5847dfdfa50d59.tar.bz2
etoys-88a2aed0c2c5450437bd7935eb5847dfdfa50d59.zip
made it work with the current libgeometry provided by the system.
Diffstat (limited to 'ptintriangle.c')
-rw-r--r--ptintriangle.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/ptintriangle.c b/ptintriangle.c
index 6313e8b..216a135 100644
--- a/ptintriangle.c
+++ b/ptintriangle.c
@@ -50,20 +50,20 @@ fromscreen(Point p)
* p to the left: -
* p on the edge: 0
*/
-static int
-edgeptcmp(Point2 e0, Point2 e1, Point2 p)
-{
- Point3 e0p, e01, r;
-
- p = subpt2(p, e0);
- e1 = subpt2(e1, e0);
- e0p = Vec3(p.x,p.y,0);
- e01 = Vec3(e1.x,e1.y,0);
- r = crossvec3(e0p, e01);
-
- /* clamp to avoid overflow */
- return fclamp(r.z, -1, 1); /* e0.x*e1.y - e0.y*e1.x */
-}
+//static int
+//edgeptcmp(Point2 e0, Point2 e1, Point2 p)
+//{
+// Point3 e0p, e01, r;
+//
+// p = subpt2(p, e0);
+// e1 = subpt2(e1, e0);
+// e0p = Vec3(p.x,p.y,0);
+// e01 = Vec3(e1.x,e1.y,0);
+// r = crossvec3(e0p, e01);
+//
+// /* clamp to avoid overflow */
+// return fclamp(r.z, -1, 1); /* e0.x*e1.y - e0.y*e1.x */
+//}
int
ptintriangle(Point2 p, Triangle t)