Definition at line 31 of file lwlinearreferencing.c.
32{
35 double mprop;
36
37
39 {
41 }
42
43 if (m1 == m2)
44 {
45
46
48 {
49 *pn = *p1;
51 }
52
53 mprop = 0.5;
54 }
55 else
56 {
57 mprop = (m - m1) / (m2 - m1);
58 }
59
60
61 pn->
x = p1->
x + (p2->
x - p1->
x) * mprop;
62 pn->
y = p1->
y + (p2->
y - p1->
y) * mprop;
63 pn->
z = p1->
z + (p2->
z - p1->
z) * mprop;
65
66
67 if (offset != 0.0)
68 {
69 double theta = atan2(p2->
y - p1->
y, p2->
x - p1->
x);
70 pn->
x -= sin(theta) * offset;
71 pn->
y += cos(theta) * offset;
72 }
73
75}
#define LW_TRUE
Return types for functions with status returns.
int p4d_same(const POINT4D *p1, const POINT4D *p2)
References FP_MAX, FP_MIN, LW_FALSE, LW_TRUE, POINT4D::m, p4d_same(), POINT4D::x, POINT4D::y, and POINT4D::z.
Referenced by ptarray_locate_along(), and ptarray_locate_along_linear().