Skip to content

Commit

Permalink
Fix jldoctest (when possible)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolaru committed Feb 9, 2025
1 parent 5078432 commit d29aec3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/piecewise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ julia> c(22.2)
1.2
julia> c(interval(0, 1.3))
[1.19999, 1.20001]_com
Interval{Float64}(1.2, 1.2, com)
```
Note that this is not equivalent to `Returns(value)` from base,
Expand All @@ -131,7 +131,7 @@ end
A function defined by pieces (each associating a domain to a function).
Support both intervals and standard numbers.
```jldoctest
```jl
julia> myabs = Piecewise(
Domain{:open, :closed}(-Inf, 0) => x -> -x,
Domain{:open, :open}(0, Inf) => identity
Expand All @@ -144,7 +144,7 @@ julia> myabs(-22.3)
22.3
julia> myabs(interval(-5, 5))
[0.0, 5.0]_def
Interval{Float64}(0.0, 5.0, def)
```
For constant pieces, it is recommended to use `Constant`
Expand Down

0 comments on commit d29aec3

Please sign in to comment.