function
LieGroups.SO2.from_Matrix
Extract angle from 2x2 rotation matrix
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | R | Real | [2,2] | 2x2 rotation matrix |
| output | theta | Real | | Rotation angle [rad] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function from_Matrix "Extract angle from 2x2 rotation matrix"
input Real R[2,2] "2x2 rotation matrix";
output Real theta "Rotation angle [rad]";
algorithm
theta := atan2(R[2,1], R[1,1]);
end from_Matrix;