diff --git a/Project.toml b/Project.toml index 0274c6c..110e5b0 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LorentzVectorHEP" uuid = "f612022c-142a-473f-8cfd-a09cf3793c6c" authors = ["Jerry Ling and contributors"] -version = "0.1.4" +version = "0.1.5" [deps] LorentzVectors = "3f54b04b-17fc-5cd4-9758-90c048d965e3" diff --git a/src/cylindrical.jl b/src/cylindrical.jl index 14c6899..c2aefdb 100644 --- a/src/cylindrical.jl +++ b/src/cylindrical.jl @@ -1,9 +1,10 @@ -struct LorentzVectorCyl{T <: AbstractFloat} +struct LorentzVectorCyl{T <: Number} pt::T eta::T phi::T mass::T end +LorentzVectorCyl(pt, eta, phi, mass) = LorentzVectorCyl(promote(pt, eta, phi, mass)...) Base.show(io::IO, v::LorentzVectorCyl) = print(io, "$(typeof(v))(pt=$(v.pt), eta=$(v.eta), phi=$(v.phi), mass=$(v.mass))")