Skip to content

Commit 689f00a

Browse files
committed
minor up
1 parent 6ef54ec commit 689f00a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/functions/math.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ end
5252
elseif xi < x[1]
5353
return y[1]
5454
end
55-
id0 = sum(xi .≥ x)
55+
# id0 = sum(xi .≥ x)
56+
id0 = searchsortedlast(x, xi)
5657
return y[id0] + (y[id0 + 1] - y[id0])/(x[id0 + 1] - x[id0])*(xi - x[id0])
5758
end

0 commit comments

Comments
 (0)