# | Line 94 | Line 94 | on_edge(const MIGRATION *ej, const FVECT ivec) | |
---|---|---|
94 | cos_a = DOT(ej->rbfv[0]->invec, ivec); | |
95 | if (cos_a <= 0) | |
96 | return(0); | |
97 | + | if (cos_a >= 1.) /* handles rounding error */ |
98 | + | return(1); |
99 | ||
100 | cos_b = DOT(ej->rbfv[1]->invec, ivec); | |
101 | if (cos_b <= 0) | |
102 | return(0); | |
103 | + | if (cos_b >= 1.) |
104 | + | return(1); |
105 | ||
106 | cos_aplusb = cos_a*cos_b - sqrt((1.-cos_a*cos_a)*(1.-cos_b*cos_b)); | |
107 | if (cos_aplusb <= 0) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |