From b88bed813f364f50566d477b0cd6d4b21b51593b Mon Sep 17 00:00:00 2001 From: HOS Date: Mon, 11 Dec 2023 17:27:32 +0100 Subject: [PATCH] Based on comments in #4156 just remove eps. --- Modelica/ComplexBlocks/Sources/ComplexRampPhasor.mo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modelica/ComplexBlocks/Sources/ComplexRampPhasor.mo b/Modelica/ComplexBlocks/Sources/ComplexRampPhasor.mo index 7f0a8ed555..bddcf8c34f 100644 --- a/Modelica/ComplexBlocks/Sources/ComplexRampPhasor.mo +++ b/Modelica/ComplexBlocks/Sources/ComplexRampPhasor.mo @@ -16,14 +16,14 @@ equation magnitude = if not useLogRamp then magnitude1 + (if time < startTime then 0 else - if time < (startTime + max(duration,eps)) then - (time - startTime)*(magnitude2-magnitude1)/max(duration,eps) + if time < (startTime + duration) then + (time - startTime)*(magnitude2-magnitude1)/duration else magnitude2-magnitude1) else if time < startTime then magnitude1 else - if time < (startTime + max(duration,eps)) then - 10^(log10(magnitude1) + (log10(magnitude2) - log10(magnitude1))*min(1, (time-startTime)/max(duration,eps))) + if time < (startTime + duration) then + 10^(log10(magnitude1) + (log10(magnitude2) - log10(magnitude1))*min(1, (time-startTime)/duration)) else magnitude2;