Skip to content

Commit

Permalink
it's a bit confusing to use a unary operator ~ as a placeholder varia…
Browse files Browse the repository at this point in the history
…ble name; in later versions of Julia the plan is to use _ for this sort of thing
  • Loading branch information
stevengj committed Jul 21, 2017
1 parent ea5e087 commit 8a1f3f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/box.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end

function normal(x::SVector{N}, b::Box{N}) where {N}
d = b.p * (x - b.c)
~, i = findmin(abs.(abs.(d) - b.r))
_m, i = findmin(abs.(abs.(d) - b.r))
return normalize(b.p[i,:] * sign(d[i])) # b.p[i,:] is non-unit for non-rectangular box
end

Expand Down
2 changes: 1 addition & 1 deletion src/vxlcut.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function rvol_quadsect(vxl::NTuple{2,SVector{3}}, nout::SVector{3}, nr₀, cbits
const w = edgedir_quadsect(cbits)
const ∆w = vxl[P][w] - vxl[N][w]

const u, v, ~ = UVW[w]
const u, v, _w = UVW[w]
const nu, nv, nw = nout[u], nout[v], nout[w]
const mean_cepts = 4nr₀
for sv = NP, su = NP
Expand Down

2 comments on commit 8a1f3f8

@wsshin
Copy link
Collaborator

@wsshin wsshin commented on 8a1f3f8 Jul 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change! I thought ~ in Julia has the same meaning as in MATLAB...

@stevengj
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the plan is to use _ for this in Julia 1.0, I think: JuliaLang/julia#9343

Please sign in to comment.