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 7197b13 commit 84e1c2cCopy full SHA for 84e1c2c
src/Blocks/math.jl
@@ -208,6 +208,28 @@ Output first input divided by second input.
208
end
209
210
211
+"""
212
+ Modulo(; name)
213
+
214
+Output the remainder when the first input is divided by second input.
215
216
+# Connectors:
217
218
+ - `input1`
219
+ - `input2`
220
+ - `output`
221
222
+@mtkmodel Modulo begin
223
+ @components begin
224
+ input1 = RealInput()
225
+ input2 = RealInput(guess = 1.0) # denominator can not be zero
226
+ output = RealOutput()
227
+ end
228
+ @equations begin
229
+ output.u ~ input1.u % input2.u
230
231
+end
232
233
"""
234
StaticNonLinearity(func; name)
235
0 commit comments