function
LieGroups.SO3.Euler.axisIndex
Convert an axis enumeration to a matrix index
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | axis | LieGroups.SO3.Euler.Axis | | |
| output | index | Integer | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function axisIndex "Convert an axis enumeration to a matrix index"
input LieGroups.SO3.Euler.Axis axis;
output Integer index;
algorithm
index := if axis == LieGroups.SO3.Euler.Axis.x then 1
elseif axis == LieGroups.SO3.Euler.Axis.y then 2 else 3;
end axisIndex;