Skip to content

Commit

Permalink
Explicitly cast exp(log(q)) to a RotationMatrix{3}
Browse files Browse the repository at this point in the history
  • Loading branch information
bzinberg committed Nov 13, 2021
1 parent 4706396 commit 159e86b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
julia = "1.5"
DocStringExtensions = "0.8.5"
Rotations = "1.0"
StaticArrays = "1.0"
julia = "1.5"
4 changes: 2 additions & 2 deletions src/PoseComposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module PoseComposition

import Base: @kwdef
import LinearAlgebra: dot, norm, cross
import Rotations: AngleAxis, Rotation, UnitQuaternion, RotZYX
import Rotations: AngleAxis, Rotation, UnitQuaternion, RotZYX, RotMatrix
import StaticArrays: StaticVector, SVector, @SVector

include("docstring_extensions.jl")
Expand Down Expand Up @@ -298,7 +298,7 @@ function quatPow(q::UnitQuaternion, t::Real)
if t == 0 || q == one(UnitQuaternion) || q == -one(UnitQuaternion)
return one(UnitQuaternion)
end
return exp(t * log(q))
return RotMatrix{3}(exp(t * log(q)))
end


Expand Down

0 comments on commit 159e86b

Please sign in to comment.