Definition at line 2316 of file measures.c.
2319 if ((A->
x == B->
x) && (A->
y == B->
y))
2337 double ba_x = (B->
x - A->
x);
2338 double ba_y = (B->
y - A->
y);
2339 double ab_length_sqr = (ba_x * ba_x + ba_y * ba_y);
2340 double ca_x = (C->x - A->
x);
2341 double ca_y = (C->y - A->
y);
2342 double dot_ac_ab = (ca_x * ba_x + ca_y * ba_y);
2346 if (dot_ac_ab >= ab_length_sqr)
2359 double s_numerator = ca_x * ba_y - ca_y * ba_x;
2362 return s_numerator * s_numerator / ab_length_sqr;
static double distance2d_sqr_pt_pt(const POINT2D *p1, const POINT2D *p2)
References distance2d_sqr_pt_pt(), POINT2D::x, and POINT2D::y.
Referenced by lwline_split_by_point_to(), ptarray_closest_segment_2d(), and ptarray_locate_point().