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 1a007be commit 6b01653Copy full SHA for 6b01653
src/ModelingToolkitStandardLibrary.jl
@@ -1,4 +1,5 @@
1
module ModelingToolkitStandardLibrary
2
+import Symbolics: unwrap
3
4
"""
5
@symcheck J > 0 || throw(ArgumentError("Expected `J` to be positive"))
@@ -10,11 +11,11 @@ macro symcheck(ex)
10
11
error("Expected an expresion on the form sym > val || error()")
12
sym = ex.args[1].args[2]
13
quote
14
+ _issymbolic(x) = !(unwrap(x) isa Real)
15
_issymbolic($(esc(sym))) || ($(esc(ex)))
16
end
17
18
-_issymbolic(x) = !(Symbolics.unwrap(x) isa Real)
19
20
include("Blocks/Blocks.jl")
21
include("Mechanical/Mechanical.jl")
0 commit comments