Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Dec 2, 2024
1 parent b23890b commit 92b942f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interpolation_methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function _interpolate(A::LinearInterpolation{<:AbstractVector}, t::Number, igues
idx = firstindex(A.u)
t1 = t2 = oneunit(eltype(A.t))
u1 = u2 = oneunit(eltype(A.u))
slope = t/t * get_parameters(A, idx)
slope = t / t * get_parameters(A, idx)
else
idx = get_idx(A, t, iguess)
t1, t2 = A.t[idx], A.t[idx + 1]
Expand Down
4 changes: 2 additions & 2 deletions test/interpolation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ end

# NaN time value for Unitful arrays: issue #365
t = (0:3)u"s" # Unitful quantities
u = [0, -2, -1, -2]u"m"
u = [0, -2, -1, -2]u"m"
A = LinearInterpolation(u, t; extrapolation = ExtrapolationType.Extension)
@test isnan(A(NaN*u"s"))
@test isnan(A(NaN * u"s"))

# Nan time value:
t = 0.0:3 # Floats
Expand Down

0 comments on commit 92b942f

Please sign in to comment.