Skip to content

Commit

Permalink
Add compat note to clamp/clamp! docstrings (JuliaLang#42159)
Browse files Browse the repository at this point in the history
  • Loading branch information
sostock authored and LilithHafner committed Mar 8, 2022
1 parent 6fc46c2 commit 46e5f43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ are promoted to a common type.
See also [`clamp!`](@ref), [`min`](@ref), [`max`](@ref).
!!! compat "Julia 1.3"
`missing` as the first argument requires at least Julia 1.3.
# Examples
```jldoctest
julia> clamp.([pi, 1.0, big(10)], 2.0, 9.0)
Expand Down Expand Up @@ -98,6 +101,9 @@ clamp(x, ::Type{T}) where {T<:Integer} = clamp(x, typemin(T), typemax(T)) % T
Restrict values in `array` to the specified range, in-place.
See also [`clamp`](@ref).
!!! compat "Julia 1.3"
`missing` entries in `array` require at least Julia 1.3.
# Examples
```jldoctest
julia> row = collect(-4:4)';
Expand Down

0 comments on commit 46e5f43

Please sign in to comment.