Skip to content

Commit

Permalink
Fix ancient dot-broadcast bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ElOceanografo authored Sep 20, 2024
1 parent 895c148 commit ea8b81e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Scatterer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ A Scatterer with a different number of body segments.
"""
function interpolate(s::Scatterer, n)
# Length along scatterer's centerline
along = [0; cumsum(vec(sqrt(sum(diff(s.r, dims=2).^2, dims=1))));]
along = [0; cumsum(vec(sqrt.(sum(diff(s.r, dims=2).^2, dims=1))));]
new_along = range(0, stop=maximum(along), length=n)
x = interpolate((along,), vec(s.r[1, :]), Gridded(Linear()))[new_along]
y = interpolate((along,), vec(s.r[2, :]), Gridded(Linear()))[new_along]
Expand Down

0 comments on commit ea8b81e

Please sign in to comment.