PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ calculate_mbc_3()

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

Definition at line 143 of file lwboundingcircle.c.

144 {
145  double d1, d2, d3;
146  circumcenter(support->p1, support->p2, support->p3, mbc->center);
147 
148  d1 = distance2d_pt_pt(mbc->center, support->p1);
149  d2 = distance2d_pt_pt(mbc->center, support->p2);
150  d3 = distance2d_pt_pt(mbc->center, support->p3);
151 
152  mbc->radius = FP_MAX(FP_MAX(d1, d2), d3);
153 }
double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2)
Definition: measures.c:2314
#define FP_MAX(A, B)
static void circumcenter(const POINT2D *a, const POINT2D *b, const POINT2D *c, POINT2D *result)
POINT2D * center
Definition: liblwgeom.h:1650
const POINT2D * p2
const POINT2D * p3
const POINT2D * p1

References LWBOUNDINGCIRCLE::center, circumcenter(), distance2d_pt_pt(), FP_MAX, SUPPORTING_POINTS::p1, SUPPORTING_POINTS::p2, SUPPORTING_POINTS::p3, and LWBOUNDINGCIRCLE::radius.

Referenced by calculate_mbc_from_support().

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