From 6e425e5bce41ecdea6bbcc175de8f382bfef733f Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Mon, 21 Dec 2020 00:17:58 -0500 Subject: [PATCH] loosen types on prev/next floating handling Is there a reason why they were so tight? --- src/utils.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index aeb94b2a5..df2ae74b9 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -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