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 f88e96c0 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

fix: if d == 0 no solution exists

parent c87509ca
Branches
Tags
No related merge requests found
......@@ -180,6 +180,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
if (k.IsEqual(0, 0.0001)) {
// constant torque: solve linear equation
// power = M * n_eng_avg
if (d.IsEqual(0, 0.0001)) {
return new List<PerSecond>();
}
return (power / d).ToEnumerable();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment