From: erg Date: Wed, 18 Jun 2008 19:28:39 +0000 (+0000) Subject: Add addPt to geom.h interface; fix conflicting names in neatogen X-Git-Tag: LAST_LIBGRAPH~32^2~3949 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72284a301d4dc34ae68fc1cf349c3bcafca616c3;p=graphviz Add addPt to geom.h interface; fix conflicting names in neatogen --- diff --git a/lib/common/geom.c b/lib/common/geom.c index b1e09f0f9..7b72bc4db 100644 --- a/lib/common/geom.c +++ b/lib/common/geom.c @@ -534,6 +534,16 @@ double ptToLine2 (pointf a, pointf b, pointf p) #define SMALL 0.0000000001 +pointf +addPt (pointf a, pointf b) +{ + pointf c; + + c.x = a.x+b.x; + c.y = a.y+b.y; + return c; +} + pointf subPt (pointf a, pointf b) { diff --git a/lib/common/geomprocs.h b/lib/common/geomprocs.h index 6b0a57475..df88bb75d 100644 --- a/lib/common/geomprocs.h +++ b/lib/common/geomprocs.h @@ -75,6 +75,7 @@ extern void rect2poly(pointf *p); extern pointf scale(double c, pointf v); extern pointf perp(pointf v); extern pointf subPt(pointf v, pointf w); +extern pointf addPt(pointf v, pointf w); extern int seg_intersect (pointf a, pointf b, pointf c, pointf d, pointf* x); #ifdef __cplusplus