Prediction: - pos: Current position - vel: Current velocity - Time: In seconds, predict how far it is in Time seconds
| 330 | // - vel: Current velocity |
| 331 | // - Time: In seconds, predict how far it is in Time seconds |
| 332 | vec PredictPos(vec pos, vec vel, float Time) |
| 333 | { |
| 334 | float flVelLength = vel.magnitude(); |
| 335 | |
| 336 | if (flVelLength <= 1.0) |
| 337 | return pos; // don't bother with low velocities... |
| 338 | |
| 339 | vec v_end = vel; |
| 340 | v_end.mul(Time); |
| 341 | v_end.add(pos); |
| 342 | return v_end; |
| 343 | } |
| 344 | |
| 345 | // returns true if the given file is valid |
| 346 | bool IsValidFile(const char *szFileName) |
no test coverage detected