From 5271e60ff3cb652cc6cfaf614e26fba43209bab1 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 30 Dec 2002 02:18:39 +0000 Subject: [PATCH] Point does not return a center of lseg. Kenji Sugita --- src/backend/utils/adt/geo_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index b6e49cc875..c8c7cc581a 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.66.2.1 2002/11/29 19:25:38 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.66.2.2 2002/12/30 02:18:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2032,8 +2032,8 @@ lseg_center(PG_FUNCTION_ARGS) result = (Point *) palloc(sizeof(Point)); - result->x = (lseg->p[0].x - lseg->p[1].x) / 2.0; - 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; PG_RETURN_POINT_P(result); } -- 2.50.0