PostGIS  2.4.9dev-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)
The old function nessecary for ptarray_segmentize2d in ptarray.c.
Definition: measures.c:2317
#define LW_FALSE
Definition: liblwgeom.h:77
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
POINT2D * center
Definition: liblwgeom.h:1643
Here is the call graph for this function:
Here is the caller graph for this function: