general_math
acos
Fix float approximations like 1.0000000000002, which acos does not like.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The arc cosine of the input value. |
Source code in opensquirrel/utils/general_math.py
are_axes_consecutive
Check if axis 'a' immediately precedes axis 'b' (in a circular fashion [x, y, z, x...]).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis_a_index
|
int
|
The index of axis 'a'. |
required |
axis_b_index
|
int
|
The index of axis 'b'. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if axis 'a' immediately precedes axis 'b', otherwise False. |