Skip to content

Commit

Permalink
Fix float type of radial rand()
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasschmitz committed Oct 23, 2024
1 parent 76995b0 commit 9d6c1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function rattle!(at::FlexibleSystem, r::Quantity)
𝐫ᵢ = p.position
T = typeof(ustrip(𝐫ᵢ[1]))
ui = randn(Vec3{T})
p_new = _set_position(p, 𝐫ᵢ + rand() * r * ui / norm(ui))
p_new = _set_position(p, 𝐫ᵢ + rand(T) * r * ui / norm(ui))
at.particles[i] = p_new
end
return at
Expand Down

0 comments on commit 9d6c1a4

Please sign in to comment.