Skip to content

Commit

Permalink
Merge pull request #3620 from JuliaReach/schillic/minmax
Browse files Browse the repository at this point in the history
Remove unused `minmax` function
  • Loading branch information
schillic authored Sep 7, 2024
2 parents dcf1a0f + a68cfb4 commit 32e583b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
1 change: 0 additions & 1 deletion docs/src/lib/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ LazySets.convert(::Type{Hyperplane{N}}, ::Expr; vars::Vector{Basic}=Basic[]) whe

```@docs
sign_cadlag
minmax
```

## Other functions
Expand Down
36 changes: 0 additions & 36 deletions src/Utils/numbers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,3 @@ julia> LazySets.sign_cadlag.([-0.6, 1.3, 0.0])
function sign_cadlag(x::Real)
return x < zero(x) ? -one(x) : one(x)
end

"""
minmax(a, b, c)
Compute the minimum and maximum of three numbers a, b, c.
### Input
- `a` -- number
- `b` -- number
- `c` -- number
### Output
The minimum and maximum of three given numbers.
### Examples
```jldoctest
julia> LazySets.minmax(1.4, 52.4, -5.2)
(-5.2, 52.4)
```
"""
function minmax(a, b, c)
if a > b
min, max = b, a
else
min, max = a, b
end
if c > max
max = c
elseif c < min
min = c
end
return min, max
end

0 comments on commit 32e583b

Please sign in to comment.