The AZ function returns the rotational displacement of marker i about the z-axis of marker j, and accounts for angle wrapping.
Marker j defaults to the global coordinate system if it is not specified. This value is computed as follows: assume that rotations about the other two axes (x-, y-axes) of marker j are zero. Then AZ is the angle between the two x-axes (or the two y-axes). AZ is measured in a counter- clockwise sense from the x-axis of the J marker to the x-axis of the I marker (see the figure below).
Measurement of AZ

AZ(i [,j ])
| i | The marker whose rotations are being sought. |
| j | The marker with respect to which the rotations are being measured. |
Mathematically, AZ is calculated as:

Cautions
For large rotations (greater than 10 degrees) about the x-axis or y-axis of marker j, the AZ function becomes increasingly non-physical. Moreover, AZ is undefined when both arguments to ATAN2 are zero. This occurs when the x-axis of marker i is orthogonal to the plane defined by the x and y-axis of the j marker.
Tips
If you want to change the AZ function so it does not account for angle wrapping, use the MOD function. For example, use the function:
(MOD(AZ(.model_1.PART_1.MAR_2, .model_1.ground.MAR_1)+PI,2*PI)-PI)
The MOD function achieves the cyclic effect and the +PI and -PI shift the curve accordingly.
-30*(AZ(21,32)-25D)