Skip to content

Commit

Permalink
Update raycast.jl
Browse files Browse the repository at this point in the history
fix minor rarer error
  • Loading branch information
martinheida committed Mar 18, 2024
1 parent 68316db commit e00f3cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/raycast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,10 @@ function raycast_des(sig::Sigma, r, u, xs, searcher::RaycastIncircleSkip, old ,e
t = get_t(r,u,x0,x) #(sum(abs2, r - x) - sum(abs2, r - x0)) / (2 * u' * (x-x0))
vvv = r+t*u
i, t = _nn(searcher.tree, vvv, skip)
x = xs[i]
t = get_t(r,u,x0,x) #(sum(abs2, r - x) - sum(abs2, r - x0)) / (2 * u' * (x-x0))
if i!=0
x = xs[i]
t = get_t(r,u,x0,x) #(sum(abs2, r - x) - sum(abs2, r - x0)) / (2 * u' * (x-x0))
end
_r = r+t*u
measure = maximum(norm(xs[s]-_r) for s in sig)
old_measure = measure
Expand Down

0 comments on commit e00f3cc

Please sign in to comment.