JuliaGeometry / Rotations.jl

Julia implementations for different rotation parameterizations
https://juliageometry.github.io/Rotations.jl
MIT License
176 stars 44 forks source link

Prettier printing for RotABC #292

Open KronosTheLate opened 5 months ago

KronosTheLate commented 5 months ago

The current printing of a RotXYZ is not the best:

julia> RotXYZ(deg2rad.((10, 20, 30))...)
3×3 RotXYZ{Float64} with indices SOneTo(3)×SOneTo(3)(0.174533, 0.349066, 0.523599):
  0.813798  -0.469846   0.34202
  0.543838   0.823173  -0.163176
 -0.204874   0.318796   0.925417

My concrete issue is the first line: 3×3 RotXYZ{Float64} with indices SOneTo(3)×SOneTo(3)(0.174533, 0.349066, 0.523599):. I find it provides too much information, and the interesting information (the angles) are not clearly angles. I would suggest something along the lines of:

julia> RotXYZ(deg2rad.((10, 20, 30))...)
3×3 RotXYZ{Float64} with angles in radians = (0.174533, 0.349066, 0.523599):
  0.813798  -0.469846   0.34202
  0.543838   0.823173  -0.163176
 -0.204874   0.318796   0.925417