Skip to content

Commit

Permalink
add methods for Base.:\(r::Rotation, v)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Oct 31, 2021
1 parent cfb4b5a commit 9647c84
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ end
inv(r1) * r2
end

@inline function Base.:\(r::Rotation, v::AbstractVector)
inv(r) * v
end

# This definition is for avoiding anbiguity
@inline function Base.:\(r::Rotation, v::StaticVector)
inv(r) * v
end

################################################################################
################################################################################
"""
Expand Down

0 comments on commit 9647c84

Please sign in to comment.