195 |
|
) |
196 |
|
{ |
197 |
|
FVECT normtarg; |
198 |
< |
double volen, dotprod, sint, cost; |
198 |
> |
double volen, dotprod, sintr, cost; |
199 |
|
int i; |
200 |
|
|
201 |
|
VCOPY(normtarg, vtarg); /* in case vtarg==vres */ |
222 |
|
else if (meas == GEOD_REL) |
223 |
|
t *= acos(dotprod); |
224 |
|
cost = cos(t); |
225 |
< |
sint = sin(t); |
225 |
> |
sintr = sin(t) / sqrt(1. - dotprod*dotprod); |
226 |
|
for (i = 0; i < 3; i++) |
227 |
|
vres[i] = volen*( cost*vres[i] + |
228 |
< |
sint*(normtarg[i] - dotprod*vres[i]) ); |
228 |
> |
sintr*(normtarg[i] - dotprod*vres[i]) ); |
229 |
|
|
230 |
|
return(volen); /* return vector length */ |
231 |
|
} |