Skip to content

Commit

Permalink
loosen types on prev/next floating handling
Browse files Browse the repository at this point in the history
Is there a reason why they were so tight?
  • Loading branch information
ChrisRackauckas committed Dec 21, 2020
1 parent 51a8af9 commit 6e425e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ const DEFAULT_LINSOLVE = DefaultLinSolve()
Move `x` one floating point towards x0.
"""
function prevfloat_tdir(x::T, x0::T, x1::T)::T where {T}
function prevfloat_tdir(x, x0, x1)
x1 > x0 ? prevfloat(x) : nextfloat(x)
end

function nextfloat_tdir(x::T, x0::T, x1::T)::T where {T}
function nextfloat_tdir(x, x0, x1)
x1 > x0 ? nextfloat(x) : prevfloat(x)
end

function max_tdir(a::T, b::T, x0::T1, x1::T1)::T where {T, T1}
function max_tdir(a, b, x0, x1)
x1 > x0 ? max(a, b) : min(a, b)
end

Expand Down

0 comments on commit 6e425e5

Please sign in to comment.