From 0e42147078b1eb4e6910e69999b0ec7899c9ebe3 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Mon, 14 Apr 2025 07:30:29 -0400 Subject: [PATCH] Fix LatticePoint subtraction --- src/lattices/latticepoints.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lattices/latticepoints.jl b/src/lattices/latticepoints.jl index c71ed9a..39917de 100644 --- a/src/lattices/latticepoints.jl +++ b/src/lattices/latticepoints.jl @@ -52,9 +52,9 @@ Base.:+(i::NTuple{N,Int}, j::LatticePoint{N}) where {N} = j + i Base.:+(i::Int, j::LatticePoint{1}) = j + i function Base.:-(i::LatticePoint{N}, j::NTuple{N,Int}) where {N} - return LatticePoint(i.coordinates .+ j, i.lattice) + return LatticePoint(i.coordinates .- j, i.lattice) end -Base.:-(i::LatticePoint{1}, j::Int) = LatticePoint(i.coordinates .+ j, i.lattice) +Base.:-(i::LatticePoint{1}, j::Int) = LatticePoint(i.coordinates .- j, i.lattice) function Base.:-(i::NTuple{N,Int}, j::LatticePoint{N}) where {N} return LatticePoint(i .- j.coordinates, j.lattice) end