#define dot(v,w) (v.x*w.x+v.y*w.y)
-/* intersect:
+/* line_intersect:
* Computes intersection of lines a-b and c-d, returning intersection
* point in *p.
* Returns 0 if no intersection (lines parallel), 1 otherwise.
*/
-int seg_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p)
+int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p)
{
pointf mv = sub_pointf(b,a);
pointf lv = sub_pointf(d,c);
extern void rect2poly(pointf *p);
-extern int seg_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p);
+extern int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p);
static inline point pointof(int x, int y)
{
raySegIntersect(pointf v, pointf w, pointf a, pointf b, pointf * p)
{
if (raySeg(v, w, a, b))
- return seg_intersect(v, w, a, b, p);
+ return line_intersect(v, w, a, b, p);
else
return 0;
}