JuliaGeometry / JuliaGeometry/Rotations.jl
Rotations in degrees (`Unitful.°`) are inexact
- Dominant language
- Julia
- Stars
- 188
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
The main reason to define a rotation with an angle in degree is to take advantage of the guaranteed-exact functions cosd and sind, e.g. Angle2d(90°)^4 is guaranteed to be the identity.
With the last version of this package, this is not the case:
julia> r=Angle2d(90°)
2×2 Angle2d{Float64} with indices SOneTo(2)×SOneTo(2)(1.5708):
6.12323e-17 -1.0
1.0 6.12323e-17
julia> r.theta
1.5707963267948966
A (relatively simple) fix is replacing the one-parameter type Angle2d{T} by Angle2d{T,A}, where A is the angle type. (However, the bad news is that once this is solved for Angle2d, it needs to be replicated for all other angle-based types).
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 with the Angle2d construction and its angle-related types, then inspect linked pull request #197 for the work already underway. Verify that degree-based rotations use the exact trigonometric behavior described in the example and that the same treatment covers the other angle-based types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100