Skip to content

Commit

Permalink
Fixed equality test
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Nov 27, 2023
1 parent 72ff8c8 commit 369c3de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ ShiftVector{S}(coord::Real...; weight::Real = 1) where S = ShiftVector{S}(SVecto

Base.hash(s::ShiftVector, h::UInt) = hash(s.vector, hash(s.weight, h))

function Base.:(==)(u::ShiftVector{S}, v::ShiftVector{S}) where S
return (u.vector == v.vector && u.weight == v.weight)
function Base.:(==)(u::ShiftVector{S1}, v::ShiftVector{S2}) where {S1,S2}
return (S1 === S2 && u.vector == v.vector && u.weight == v.weight)
end

Base.IndexStyle(::Type{<:ShiftVector}) = IndexLinear()
Expand Down

0 comments on commit 369c3de

Please sign in to comment.