Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 74a08942 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

fix: comparison with range

parent 527ee000
No related branches found
No related tags found
No related merge requests found
...@@ -735,7 +735,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -735,7 +735,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
retVal.SimulationInterval = -currentSpeed / acceleration; retVal.SimulationInterval = -currentSpeed / acceleration;
var stopDistance = currentSpeed * retVal.SimulationInterval + var stopDistance = currentSpeed * retVal.SimulationInterval +
acceleration / 2 * retVal.SimulationInterval * retVal.SimulationInterval; acceleration / 2 * retVal.SimulationInterval * retVal.SimulationInterval;
if (stopDistance > ds) { if (stopDistance.IsGreater(ds)) {
// just to cover everything - does not happen... // just to cover everything - does not happen...
Log.Error( Log.Error(
"Could not find solution for computing required time interval to drive distance ds: {0}. currentSpeed: {1}, acceleration: {2}, stopDistance: {3}, distance: {4}", "Could not find solution for computing required time interval to drive distance ds: {0}. currentSpeed: {1}, acceleration: {2}, stopDistance: {3}, distance: {4}",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment