Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rotations.params methods for RotationGenerator #216

Merged
merged 2 commits into from
Jan 23, 2022

Conversation

hyrodium
Copy link
Collaborator

This PR fixes #213.

Before this PR

julia> using Rotations

julia> RotationVecGenerator(1,2,3)
3×3 RotationVecGenerator{Int64} with indices SOneTo(3)×SOneTo(3)(1, 2, 3):
  0  -3   2
  3   0  -1
 -2   1   0

julia> Rotations.params(RotationVecGenerator(1,2,3))
ERROR: MethodError: no method matching params(::RotationVecGenerator{Int64})
Closest candidates are:
  params(::RotZY) at ~/.julia/dev/Rotations/src/euler_types.jl:259
  params(::AngleAxis) at ~/.julia/dev/Rotations/src/angleaxis_types.jl:40
  params(::RotY) at ~/.julia/dev/Rotations/src/euler_types.jl:37
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

After this PR

julia> using Rotations

julia> RotationVecGenerator(1,2,3)
3×3 RotationVecGenerator{Int64} with indices SOneTo(3)×SOneTo(3)(1, 2, 3):
  0  -3   2
  3   0  -1
 -2   1   0

julia> Rotations.params(RotationVecGenerator(1,2,3))
3-element StaticArrays.SVector{3, Int64} with indices SOneTo(3):
 1
 2
 3

@hyrodium hyrodium requested a review from andyferris January 15, 2022 14:34
@hyrodium hyrodium mentioned this pull request Jan 15, 2022
@codecov
Copy link

codecov bot commented Jan 15, 2022

Codecov Report

Merging #216 (482a07e) into master (754769c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #216      +/-   ##
==========================================
+ Coverage   88.13%   88.14%   +0.01%     
==========================================
  Files          15       15              
  Lines        1601     1603       +2     
==========================================
+ Hits         1411     1413       +2     
  Misses        190      190              
Impacted Files Coverage Δ
src/rotation_generator.jl 95.90% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 754769c...482a07e. Read the comment docs.

@hyrodium hyrodium merged commit 5319b35 into JuliaGeometry:master Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add params methods for RotationGenerator
1 participant