Definition at line 2408 of file measures.c.
2411 if ((A->
x == B->
x) && (A->
y == B->
y))
2429 double ba_x = (B->
x - A->
x);
2430 double ba_y = (B->
y - A->
y);
2431 double ab_length_sqr = (ba_x * ba_x + ba_y * ba_y);
2432 double ca_x = (C->x - A->
x);
2433 double ca_y = (C->y - A->
y);
2434 double dot_ac_ab = (ca_x * ba_x + ca_y * ba_y);
2438 if (dot_ac_ab >= ab_length_sqr)
2451 double s_numerator = ca_x * ba_y - ca_y * ba_x;
2454 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().