We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComplexRotation <: Rotation{2}
We now have two types for 2D rotations:
RotMatrix{2}
Angle2d
However, a 2D rotation can be parametrized with two real values $(c,s)$ like
$$ R = \begin{pmatrix}c & -s \\ s & c\end{pmatrix}. $$
This rotation is the same as a rotation by a complex number $c+is$, and can be implemented like this:
struct ComplexRotation{T} <: Rotation{2,T} c::Complex{T} end
This is sometimes useful when we need to generate a rotation from 2D vectors. See rotation_between for example.
rotation_between
Rotations.jl/src/rotation_between.jl
Lines 9 to 15 in f00b07d
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We now have two types for 2D rotations:
RotMatrix{2}
stores four real values as a matrixAngle2d
stores one real value as a rotation angleHowever, a 2D rotation can be parametrized with two real values$(c,s)$ like
This rotation is the same as a rotation by a complex number$c+is$ , and can be implemented like this:
This is sometimes useful when we need to generate a rotation from 2D vectors.
See
rotation_between
for example.Rotations.jl/src/rotation_between.jl
Lines 9 to 15 in f00b07d
The text was updated successfully, but these errors were encountered: