Definition at line 1675 of file measures.c.
References DISTPTS::distance, distance2d_sqr_pt_pt(), lw_segment_side(), LW_TRUE, DISTPTS::p1, DISTPTS::p2, POINT2D::x, and POINT2D::y.
Referenced by lw_dist2d_arc_arc(), and lw_dist2d_pt_arc().
1682 double dist_sqr, shortest_sqr;
1687 if (radius_A == radius_B)
1728 proj.
x = CENTER->
x + (B1->
x - CENTER->
x) * radius_A / radius_B;
1729 proj.
y = CENTER->
y + (B1->
y - CENTER->
y) * radius_A / radius_B;
1735 dl->
distance = fabs(radius_A - radius_B);
1739 proj.
x = CENTER->
x + (B3->
x - CENTER->
x) * radius_A / radius_B;
1740 proj.
y = CENTER->
y + (B3->
y - CENTER->
y) * radius_A / radius_B;
1745 dl->
distance = fabs(radius_A - radius_B);
1753 proj.
x = CENTER->
x + (A1->
x - CENTER->
x) * radius_B / radius_A;
1754 proj.
y = CENTER->
y + (A1->
y - CENTER->
y) * radius_B / radius_A;
1759 dl->
distance = fabs(radius_A - radius_B);
1764 proj.
x = CENTER->
x + (A3->
x - CENTER->
x) * radius_B / radius_A;
1765 proj.
y = CENTER->
y + (A3->
y - CENTER->
y) * radius_B / radius_A;
1770 dl->
distance = fabs(radius_A - radius_B);
1781 if (dist_sqr < shortest_sqr)
1783 shortest_sqr = dist_sqr;
1789 if (dist_sqr < shortest_sqr)
1791 shortest_sqr = dist_sqr;
1797 if (dist_sqr < shortest_sqr)
1799 shortest_sqr = dist_sqr;
double distance2d_sqr_pt_pt(const POINT2D *p1, const POINT2D *p2)
#define LW_TRUE
Return types for functions with status returns.
int lw_segment_side(const POINT2D *p1, const POINT2D *p2, const POINT2D *q)
lw_segment_side()