mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Add point_ne() function.
Fix up tabbing of most function declarations.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.24 1997/09/18 20:22:13 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.25 1997/09/20 16:22:31 thomas Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -28,6 +28,10 @@
|
|||||||
#define PI 3.1415926536
|
#define PI 3.1415926536
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Internal routines
|
||||||
|
*/
|
||||||
|
|
||||||
static int point_inside(Point *p, int npts, Point plist[]);
|
static int point_inside(Point *p, int npts, Point plist[]);
|
||||||
static int lseg_crossing(double x, double y, double px, double py);
|
static int lseg_crossing(double x, double y, double px, double py);
|
||||||
static BOX *box_construct(double x1, double x2, double y1, double y2);
|
static BOX *box_construct(double x1, double x2, double y1, double y2);
|
||||||
@ -1462,6 +1466,12 @@ point_eq(Point *pt1, Point *pt2)
|
|||||||
return (point_horiz(pt1, pt2) && point_vert(pt1, pt2));
|
return (point_horiz(pt1, pt2) && point_vert(pt1, pt2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
point_ne(Point *pt1, Point *pt2)
|
||||||
|
{
|
||||||
|
return (! point_eq(pt1, pt2));
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------
|
/*----------------------------------------------------------
|
||||||
* "Arithmetic" operators on points.
|
* "Arithmetic" operators on points.
|
||||||
*---------------------------------------------------------*/
|
*---------------------------------------------------------*/
|
||||||
@ -3173,8 +3183,7 @@ path_poly(PATH *path)
|
|||||||
* New-style: '((x1,y1),...)' for closed path
|
* New-style: '((x1,y1),...)' for closed path
|
||||||
* '[(x1,y1),...]' for open path
|
* '[(x1,y1),...]' for open path
|
||||||
*/
|
*/
|
||||||
PATH
|
PATH *
|
||||||
*
|
|
||||||
upgradepath(PATH *path)
|
upgradepath(PATH *path)
|
||||||
{
|
{
|
||||||
PATH *result;
|
PATH *result;
|
||||||
@ -3336,8 +3345,7 @@ poly_path(POLYGON *poly)
|
|||||||
* Old-style: '(x1,x2,...,y1,y2,...)'
|
* Old-style: '(x1,x2,...,y1,y2,...)'
|
||||||
* New-style: '(x1,y1,x2,y2,...)'
|
* New-style: '(x1,y1,x2,y2,...)'
|
||||||
*/
|
*/
|
||||||
POLYGON
|
POLYGON *
|
||||||
*
|
|
||||||
upgradepoly(POLYGON *poly)
|
upgradepoly(POLYGON *poly)
|
||||||
{
|
{
|
||||||
POLYGON *result;
|
POLYGON *result;
|
||||||
@ -3383,8 +3391,7 @@ upgradepoly(POLYGON *poly)
|
|||||||
/* revertpoly()
|
/* revertpoly()
|
||||||
* Reverse effect of upgradepoly().
|
* Reverse effect of upgradepoly().
|
||||||
*/
|
*/
|
||||||
POLYGON
|
POLYGON *
|
||||||
*
|
|
||||||
revertpoly(POLYGON *poly)
|
revertpoly(POLYGON *poly)
|
||||||
{
|
{
|
||||||
POLYGON *result;
|
POLYGON *result;
|
||||||
@ -3552,7 +3559,7 @@ circle_same(CIRCLE *circle1, CIRCLE *circle2)
|
|||||||
return (FPeq(circle1->radius, circle2->radius)
|
return (FPeq(circle1->radius, circle2->radius)
|
||||||
&& FPeq(circle1->center.x, circle2->center.x)
|
&& FPeq(circle1->center.x, circle2->center.x)
|
||||||
&& FPeq(circle1->center.y, circle2->center.y));
|
&& FPeq(circle1->center.y, circle2->center.y));
|
||||||
}
|
} /* circle_same() */
|
||||||
|
|
||||||
/* circle_overlap - does circle1 overlap circle2?
|
/* circle_overlap - does circle1 overlap circle2?
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user