Name | Description |
---|---|
after | Return the axis following a given axis in Cartesian coordinates |
before | Return the axis preceding a given axis in Cartesian coordinates |
cartWrap | Return the index to a Cartesian axis (1 to 3 or Axis.x to Axis.z) after wrapping |
Example:
after(Axis.z)
or after(3)
returns 1, which is equivalent to Axis.x
.
Type | Name | Default | Description |
---|---|---|---|
Axis | axis |
Type | Name | Description |
---|---|---|
Axis | after |
function after "Return the axis following a given axis in Cartesian coordinates" extends Modelica.Icons.Function; input Axis axis; output Axis after; algorithm after := cartWrap(axis + 1); end after;
Example:
after(Axis.x)
or after(1)
returns 3, which is equivalent to Axis.z
.
Type | Name | Default | Description |
---|---|---|---|
Axis | axis |
Type | Name | Description |
---|---|---|
Axis | after |
function before "Return the axis preceding a given axis in Cartesian coordinates" extends Modelica.Icons.Function; input Axis axis; output Axis after; algorithm after := cartWrap(axis - 1); end before;
Examples:
cartWrap(0)
returns 3 and cartWrap(4)
returns 1.
Type | Name | Default | Description |
---|---|---|---|
Integer | num | Dividend | |
Integer | den | Axis.z | Divisor |
Type | Name | Description |
---|---|---|
Integer | index | Remainder with 1-based indexing |
function cartWrap = mod1 (final den=Axis.z) "Return the index to a Cartesian axis (1 to 3 or Axis.x to Axis.z) after wrapping";