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

principal_value(::RotXYX) does not return principal value #193

Open
hyrodium opened this issue Nov 11, 2021 · 0 comments
Open

principal_value(::RotXYX) does not return principal value #193

hyrodium opened this issue Nov 11, 2021 · 0 comments

Comments

@hyrodium
Copy link
Collaborator

hyrodium commented Nov 11, 2021

julia> using Rotations

julia> principal_value(RotXYX(0.1,0,-0.1))
3×3 RotXYX{Float64} with indices SOneTo(3)×SOneTo(3)(0.1, 0.0, -0.1):
  1.0  -0.0  0.0
  0.0   1.0  0.0
 -0.0   0.0  1.0

julia> principal_value(RotXYX(0.1,0,-0.1)) == RotXYX(0,0,0)
true

This is because the principal_value method makes sure that the angles are between -π and π. (https://github.com/JuliaGeometry/Rotations.jl/blob/v1.0.4/src/principal_value.jl#L82)

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

No branches or pull requests

1 participant