Changeset 10291 for code/trunk/src/libraries
- Timestamp:
- Mar 1, 2015, 3:08:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/util/Math.cc
r10289 r10291 360 360 return orxonox::Vector3::ZERO; 361 361 362 float temp = sqrt(discriminant); 363 float solution1 = (-b + temp) / (2 * a); 364 float solution2 = (-b - temp) / (2 * a); 365 float time = 1.0f / std::max(solution1, solution2); 362 float solution = (-b + sqrt(discriminant)) / (2 * a); 363 float time = 1.0f / solution; 366 364 367 365 return (targetposition + targetvelocity * time);
Note: See TracChangeset
for help on using the changeset viewer.