JuliaGeometry / Rotations.jl

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

rename `AngleAxis` to `AxisAngle`? #218

Open hyrodium opened 2 years ago

hyrodium commented 2 years ago

As discussed in #210, it's better to follow the order of SVector.

julia> aa = AngleAxis(2.4, 0, 0, 1) # angle, x, y, z
3×3 AngleAxis{Float64} with indices SOneTo(3)×SOneTo(3)(2.4, 0.0, 0.0, 1.0):
 -0.737394  -0.675463  0.0
  0.675463  -0.737394  0.0
  0.0        0.0       1.0

julia> Rotations.params(aa).z  # this should be 1
0.0

julia> Rotations.params(aa).w  # this should be 2.4
1.0

If we change the order from (theta, axis_x, axis_y, axis_z) to (axis_x, axis_y, axis_z, theta) (or just (x,y,z,angle)), then the name of the type should be changed to AxisAngle.