PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ point_inside_circle()

static int point_inside_circle ( const POINT2D p,
const LWBOUNDINGCIRCLE c 
)
static

Definition at line 85 of file lwboundingcircle.c.

References LWBOUNDINGCIRCLE::center, distance2d_pt_pt(), LW_FALSE, LW_TRUE, and LWBOUNDINGCIRCLE::radius.

Referenced by calculate_mbc().

86 {
87  if (!c)
88  return LW_FALSE;
89 
90  if (distance2d_pt_pt(p, c->center) - c->radius > DBL_EPSILON)
91  return LW_FALSE;
92 
93  return LW_TRUE;
94 }
double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2)
Definition: measures.c:2313
#define LW_FALSE
Definition: liblwgeom.h:76
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:75
POINT2D * center
Definition: liblwgeom.h:1649
Here is the call graph for this function:
Here is the caller graph for this function: