51 for (i = 0; i < npoints; i++)
53 if (distances[i] == 0)
56 denom += 1.0 / distances[i];
59 for (i = 0; i < npoints; i++)
63 next.
x += (points[i].
x / distances[i]) / denom;
64 next.
y += (points[i].
y / distances[i]) / denom;
65 next.
z += (points[i].
z / distances[i]) / denom;
91 for (i = 0; i < npoints; i++)
95 dx += (points[i].
x - curr->
x) / distances[i];
96 dy += (points[i].
y - curr->
y) / distances[i];
97 dz += (points[i].
z - curr->
z) / distances[i];
101 d_sqr = sqrt (dx*dx + dy*dy + dz*dz);
102 r_inv = d_sqr > DBL_EPSILON ? 1.0 / d_sqr : 1.0;
#define LW_TRUE
Return types for functions with status returns.
double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2)