Skip to content

Commit

Permalink
Ensured negation of a SpinBivector is a SpinBivector
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Nov 29, 2023
1 parent d784082 commit 913dc50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/spin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,6 @@ function SpinBivector(u::AbstractVector, v::AbstractVector)
end

(T::Type{<:SpinBivector{D}})(u::AbstractVector, v::AbstractVector) where D = T(_wedge_matrix(u,v))

Check warning on line 148 in src/data/spin.jl

View check run for this annotation

Codecov / codecov/patch

src/data/spin.jl#L148

Added line #L148 was not covered by tests

# TODO: mathematical operations should return reasonable types
Base.:-(s::SpinBivector) = typeof(s)(-s.matrix)

0 comments on commit 913dc50

Please sign in to comment.