Skip to content

Commit 0e42147

Browse files
committed
Fix LatticePoint subtraction
1 parent 1dc9592 commit 0e42147

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lattices/latticepoints.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Base.:+(i::NTuple{N,Int}, j::LatticePoint{N}) where {N} = j + i
5252
Base.:+(i::Int, j::LatticePoint{1}) = j + i
5353

5454
function Base.:-(i::LatticePoint{N}, j::NTuple{N,Int}) where {N}
55-
return LatticePoint(i.coordinates .+ j, i.lattice)
55+
return LatticePoint(i.coordinates .- j, i.lattice)
5656
end
57-
Base.:-(i::LatticePoint{1}, j::Int) = LatticePoint(i.coordinates .+ j, i.lattice)
57+
Base.:-(i::LatticePoint{1}, j::Int) = LatticePoint(i.coordinates .- j, i.lattice)
5858
function Base.:-(i::NTuple{N,Int}, j::LatticePoint{N}) where {N}
5959
return LatticePoint(i .- j.coordinates, j.lattice)
6060
end

0 commit comments

Comments
 (0)