summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/geo_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 88b2584b77..4c27a40ad8 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -2043,8 +2043,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);
}