Skip to content

Commit d0f6b47

Browse files
author
vruge
committed
fixed semiLinear
- see #3765 Thanks crupp
1 parent 6c723ab commit d0f6b47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SimulationRuntime/c/openmodelica.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct type_desc_s {
151151

152152
/* Special Modelica builtin functions*/
153153
#define smooth(P,EXP) (EXP)
154-
#define semiLinear(x,positiveSlope,negativeSlope) (x>=0?positiveSlope*x:negativeSlope*x)
154+
#define semiLinear(x,positiveSlope,negativeSlope) (x>=0?(positiveSlope)*(x):(negativeSlope)*(x))
155155

156156
/* sign function */
157157
static inline int sign(double v)

0 commit comments

Comments
 (0)