Random

Usage of random point generators is straightforward:

julia> using PhysicalParticles
julia> rand(PVector{Float64}, 3, 3)3×3 Matrix{PVector{Float64}}: PVector{Float64}(0.935016, 0.163459, 0.550312) … PVector{Float64}(0.242632, 0.158674, 0.680724) PVector{Float64}(0.648647, 0.00542805, 0.942547) PVector{Float64}(0.833064, 0.659376, 0.793336) PVector{Float64}(0.977945, 0.42861, 0.238057) PVector{Float64}(0.961365, 0.805086, 0.25915)
julia> rand(PVector2D{Int}, 3)3-element Vector{PVector2D{Int64}}: PVector2D{Int64}(135865820195243044, 7485383135154195373) PVector2D{Int64}(-5588049760132760182, 1081852039645617464) PVector2D{Int64}(-766422757915837816, -3054123842838476230)
julia> p = randn_pvector(3)3-element Vector{PVector{Float64}}: PVector{Float64}(-0.6921452988095209, 0.7192441624796598, -0.1224515513855283) PVector{Float64}(-1.1922663334410117, -1.0831056012330036, -0.9100955499228298) PVector{Float64}(-0.8071108371192652, 0.1605769380468502, -0.6092229558173414)
julia> pu = randn_pvector(3, u"m")3-element Vector{PVector{Unitful.Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}}: PVector(0.692305404365882 m, 0.0902109570772545 m, -1.799926420739794 m) PVector(1.232366823895554 m, 2.212477273851093 m, 0.5411102369332376 m) PVector(-0.6450969619050169 m, 1.1273609501278494 m, -0.08091475297948635 m)

To generate vectors in normal distribution:

randn_pvector(n::Integer)
randn_pvector(n::Integer, T::DataType)
randn_pvector(n::Integer, u::Unitful.Units)
randn_pvector(n::Integer, u::Unitful.Units, T::DataType)

randn_pvector2d(n::Integer)
randn_pvector2d(n::Integer, T::DataType)
randn_pvector2d(n::Integer, u::Unitful.Units)
randn_pvector2d(n::Integer, u::Unitful.Units, T::DataType)