JuliaGeometry / JuliaGeometry/Rotations.jl
`principal_value(::RotXYX)` does not return principal value
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 188
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Julia REPL example, then inspect the principal_value method around the linked lines in src/principal_value.jl. Trace how RotXYX angles are normalized and verify that the supplied equivalent rotation produces the expected principal value rather than only constraining each angle to [-π, π].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100