Skip to content

Commit

Permalink
refactor: check for extrpolate first
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan committed Jun 27, 2024
1 parent 9044c55 commit eae19d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interpolation_methods.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function _interpolate(interp, t)
((t < interp.t[1] || t > interp.t[end]) && !interp.extrapolate) &&
(!interp.extrapolate && (t < interp.t[1] || t > interp.t[end])) &&
throw(ExtrapolationError())
_interpolate(interp, t, firstindex(interp.t) - 1)[1]
end
Expand Down

0 comments on commit eae19d2

Please sign in to comment.