Skip to content

Commit

Permalink
Reimplemented Base.literal_pow(::typeof(^), ::KVector{1}, ::Val{2})
Browse files Browse the repository at this point in the history
… in terms of `scalar_product`
  • Loading branch information
brainandforce committed Sep 19, 2024
1 parent 8492608 commit 83db382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/exponential.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end
=#

@inline function Base.literal_pow(::typeof(^), x::KVector{1,Q}, ::Val{2}) where Q
return KVector{0,Q}(x * x)
return KVector{0,Q}(scalar_product(x, x))
end

# TODO: In 3 or fewer dimensions, all k-vectors are k-blades, so promote to KVector{0}
Expand Down

0 comments on commit 83db382

Please sign in to comment.