Returns the length of a circular arc segment.
121 double radius_A, circumference_A;
122 int a2_side, clockwise;
134 double dx = A1->
x - A3->
x;
135 double dy = A1->
y - A3->
y;
136 return sqrt(dx*dx + dy*dy);
140 circumference_A = M_PI * 2 * radius_A;
142 return circumference_A;
155 a1 = atan2(A1->
y - C.
y, A1->
x - C.
x);
156 a3 = atan2(A3->
y - C.
y, A3->
x - C.
x);
164 angle = 2*M_PI + a1 - a3;
171 angle = 2*M_PI + a3 - a1;
175 return circumference_A * (angle / (2*M_PI));
#define LW_TRUE
Return types for functions with status returns.
double lw_arc_center(const POINT2D *p1, const POINT2D *p2, const POINT2D *p3, POINT2D *result)
Determines the center of the circle defined by the three given points.
int lw_segment_side(const POINT2D *p1, const POINT2D *p2, const POINT2D *q)
lw_segment_side()
int lw_arc_is_pt(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3)
Returns true if arc A is actually a point (all vertices are the same) .
int p2d_same(const POINT2D *p1, const POINT2D *p2)