Revision abce6607
| utility/vector.h | ||
|---|---|---|
| 95 | 95 |
|
| 96 | 96 |
if(isnan(res)) |
| 97 | 97 |
return 0; |
| 98 |
if((fabs(res)-1) >= 0.000001) //avoid a sqrt if possible
|
|
| 98 |
if((fabs(res-1)) >= 0.000001) // Avoid a sqrt if possible.
|
|
| 99 | 99 |
return sqrt(res); |
| 100 | 100 |
return 1; |
| 101 | 101 |
} |
Also available in: Unified diff