We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c603a2b commit b6e892aCopy full SHA for b6e892a
projects/biogears/libBiogears/src/engine/Systems/Respiratory.cpp
@@ -1011,7 +1011,7 @@ void Respiratory::RespiratoryDriver()
1011
m_DriverPressurePath->GetNextPressureSource().SetValue(m_DriverPressure_cmH2O, PressureUnit::cmH2O);
1012
1013
// Update respiration cycle percentage
1014
- GetRespirationCyclePercentComplete().SetValue(m_BreathingCycleTime_s / (60.0 / m_VentilationFrequency_Per_min));
+ GetRespirationCyclePercentComplete().SetValue(std::min(1.0, std::max(0.0, m_BreathingCycleTime_s / (60.0 / m_VentilationFrequency_Per_min))));
1015
}
1016
//-------------------------------------------------------------------------------------------------
1017
///\brief
0 commit comments