Definition at line 2407 of file measures.c.
2410 if ((A->
x == B->
x) && (A->
y == B->
y))
2428 double ba_x = (B->
x - A->
x);
2429 double ba_y = (B->
y - A->
y);
2430 double ab_length_sqr = (ba_x * ba_x + ba_y * ba_y);
2431 double ca_x = (C->x - A->
x);
2432 double ca_y = (C->y - A->
y);
2433 double dot_ac_ab = (ca_x * ba_x + ca_y * ba_y);
2437 if (dot_ac_ab >= ab_length_sqr)
2450 double s_numerator = ca_x * ba_y - ca_y * ba_x;
2453 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(), and ptarray_locate_point().