2D Rotation Matrix

An $2 \times 2$ rotation matrix storing the rotation. This is a simple wrapper for a StaticArrays SMatrix{2,2,T}. A rotation matrix $R$ should have the property $I = R R^\top$, but this isn't enforced by the constructor. On the other hand, all the types below are guaranteed to be "proper" rotations for all input parameters (equivalently: parity conserving, in $SO(2)$, $\det(R) = 1$, or a rotation without reflection).

RotMatrix2

example

julia> t = 1.2  # rotation angle1.2
julia> m = [cos(t) -sin(t);sin(t) cos(t)]2×2 Matrix{Float64}: 0.362358 -0.932039 0.932039 0.362358
julia> RotMatrix{2}(m) # construct from matrix2×2 RotMatrix2{Float64} with indices SOneTo(2)×SOneTo(2): 0.362358 -0.932039 0.932039 0.362358
julia> RotMatrix{2}(t) # construct from angle2×2 RotMatrix2{Float64} with indices SOneTo(2)×SOneTo(2): 0.362358 -0.932039 0.932039 0.362358