Skip to content

Commit

Permalink
Merge pull request #22 from JuliaComputing/loosen_types
Browse files Browse the repository at this point in the history
loosen types on prev/next floating handling
  • Loading branch information
ChrisRackauckas authored Dec 21, 2020
2 parents 51a8af9 + 6e425e5 commit c0db7a6
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 c0db7a6

Please sign in to comment.