We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ef54ec commit 689f00aCopy full SHA for 689f00a
src/functions/math.jl
@@ -52,6 +52,7 @@ end
52
elseif xi < x[1]
53
return y[1]
54
end
55
- id0 = sum(xi .≥ x)
+ # id0 = sum(xi .≥ x)
56
+ id0 = searchsortedlast(x, xi)
57
return y[id0] + (y[id0 + 1] - y[id0])/(x[id0 + 1] - x[id0])*(xi - x[id0])
58
0 commit comments