We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b33265e commit 500ba40Copy full SHA for 500ba40
src/backend/utils/adt/geo_ops.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.72 2002/11/29 19:25:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.73 2002/12/30 02:18:29 tgl Exp $
12
13
*-------------------------------------------------------------------------
14
*/
@@ -2043,8 +2043,8 @@ lseg_center(PG_FUNCTION_ARGS)
2043
2044
result = (Point *) palloc(sizeof(Point));
2045
2046
- result->x = (lseg->p[0].x - lseg->p[1].x) / 2.0;
2047
- result->y = (lseg->p[0].y - lseg->p[1].y) / 2.0;
+ result->x = (lseg->p[0].x + lseg->p[1].x) / 2.0;
+ result->y = (lseg->p[0].y + lseg->p[1].y) / 2.0;
2048
2049
PG_RETURN_POINT_P(result);
2050
}
0 commit comments