mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-14 19:23:42 +02:00
Corrected small bug in SU(2) unitarization
This commit is contained in:
parent
c325f8c1d9
commit
a65d722bab
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ Return a unitarized element of the group.
|
|||
function unitarize(a::SU2{T}) where T <: AbstractFloat
|
||||
dr = sqrt(abs2(a.t1) + abs2(a.t2))
|
||||
if (dr == 0.0)
|
||||
return SU2(0.0)
|
||||
return SU2{T}(0.0,0.0)
|
||||
end
|
||||
return SU2{T}(a.t1/dr,a.t2/dr)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue