From: Paul Ramsey Date: Mon, 25 May 2015 17:58:44 +0000 (+0000) Subject: Move inline functions for clang compat X-Git-Tag: 2.2.0rc1~461 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c50f5c6688792f68be447b125d3c8e9db01bb7c;p=postgis Move inline functions for clang compat git-svn-id: http://svn.osgeo.org/postgis/trunk@13553 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/measures3d.c b/liblwgeom/measures3d.c index e9ac56b31..68e074698 100644 --- a/liblwgeom/measures3d.c +++ b/liblwgeom/measures3d.c @@ -17,6 +17,26 @@ #include "lwgeom_log.h" +static inline int +get_3dvector_from_points(POINT3DZ *p1,POINT3DZ *p2, VECTOR3D *v) +{ + v->x=p2->x-p1->x; + v->y=p2->y-p1->y; + v->z=p2->z-p1->z; + + return LW_TRUE; +} + +static inline int +get_3dcross_product(VECTOR3D *v1,VECTOR3D *v2, VECTOR3D *v) +{ + v->x=(v1->y*v2->z)-(v1->z*v2->y); + v->y=(v1->z*v2->x)-(v1->x*v2->z); + v->z=(v1->x*v2->y)-(v1->y*v2->x); + + return LW_TRUE; +} + LWGEOM * lwgeom_closest_line_3d(LWGEOM *lw1, LWGEOM *lw2) diff --git a/liblwgeom/measures3d.h b/liblwgeom/measures3d.h index a90ed9203..a13c9e5f7 100644 --- a/liblwgeom/measures3d.h +++ b/liblwgeom/measures3d.h @@ -86,24 +86,5 @@ int pt_in_ring_3d(const POINT3DZ *p, const POINTARRAY *ring,PLANE3D *plane); Helper functions */ -inline int -get_3dvector_from_points(POINT3DZ *p1,POINT3DZ *p2, VECTOR3D *v) -{ - v->x=p2->x-p1->x; - v->y=p2->y-p1->y; - v->z=p2->z-p1->z; - - return LW_TRUE; -} - -inline int -get_3dcross_product(VECTOR3D *v1,VECTOR3D *v2, VECTOR3D *v) -{ - v->x=(v1->y*v2->z)-(v1->z*v2->y); - v->y=(v1->z*v2->x)-(v1->x*v2->z); - v->z=(v1->x*v2->y)-(v1->y*v2->x); - - return LW_TRUE; -} #endif /* !defined _MEASURES3D_H */