PLEnuM-group / PhysicsTools.jl

Library of common types and functions
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

convenience constructor for Particle #11

Open chrhck opened 11 months ago

chrhck commented 11 months ago

Currently all numeric fields for Particle have to be of same type in the constructor. Add a convenience constructor that uses T = promote_type(args..) on all numerics arguments to create a Particle{T}

chrhck commented 11 months ago

For reference: https://docs.julialang.org/en/v1/manual/conversion-and-promotion/