PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ calculate_mbc_2()

static void calculate_mbc_2 ( const SUPPORTING_POINTS support,
LWBOUNDINGCIRCLE mbc 
)
static

Definition at line 129 of file lwboundingcircle.c.

130{
131 double d1, d2;
132
133 mbc->center->x = 0.5*(support->p1->x + support->p2->x);
134 mbc->center->y = 0.5*(support->p1->y + support->p2->y);
135
136 d1 = distance2d_pt_pt(mbc->center, support->p1);
137 d2 = distance2d_pt_pt(mbc->center, support->p2);
138
139 mbc->radius = FP_MAX(d1, d2);
140}
double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2)
Definition measures.c:2344
#define FP_MAX(A, B)
POINT2D * center
Definition liblwgeom.h:1846
double y
Definition liblwgeom.h:390
double x
Definition liblwgeom.h:390
const POINT2D * p2
const POINT2D * p1

References LWBOUNDINGCIRCLE::center, distance2d_pt_pt(), FP_MAX, SUPPORTING_POINTS::p1, SUPPORTING_POINTS::p2, LWBOUNDINGCIRCLE::radius, POINT2D::x, and POINT2D::y.

Referenced by calculate_mbc_from_support().

Here is the call graph for this function:
Here is the caller graph for this function: