| 229 | // for small arguments. |
| 230 | |
| 231 | static inline dReal |
| 232 | sinc (dReal x) |
| 233 | { |
| 234 | // if |x| < 1e-4 then use a taylor series expansion. this two term expansion |
| 235 | // is actually accurate to one LS bit within this range if double precision |
| 236 | // is being used - so don't worry! |
| 237 | if (dFabs (x) < 1.0e-4) |
| 238 | return REAL (1.0) - x * x * REAL (0.166666666666666666667); |
| 239 | else |
| 240 | return dSin (x) / x; |
| 241 | } |
| 242 | |
| 243 | |
| 244 | // given a body b, apply its linear and angular rotation over the time |