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

◆ circumcenter()

static void circumcenter ( const POINT2D a,
const POINT2D b,
const POINT2D c,
POINT2D result 
)
static

Definition at line 103 of file lwboundingcircle.c.

104{
105 double cx = c->x;
106 double cy = c->y;
107 double ax = a->x - cx;
108 double ay = a->y - cy;
109 double bx = b->x - cx;
110 double by = b->y - cy;
111
112 double denom = 2 * det(ax, ay, bx, by);
113 double numx = det(ay, ax * ax + ay * ay, by, bx * bx + by * by);
114 double numy = det(ax, ax * ax + ay * ay, bx, bx * bx + by * by);
115
116 result->x = cx - numx / denom;
117 result->y = cy + numy / denom;
118}
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition cu_print.c:267
static double det(double m00, double m01, double m10, double m11)
double y
Definition liblwgeom.h:390
double x
Definition liblwgeom.h:390

References det(), result, POINT2D::x, and POINT2D::y.

Referenced by calculate_mbc_3().

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