1% =========================================================================== %
2%> @brief convert an axis and a direction to a vector
4%> @param axis axis (x, y, z) or number (1, 2, 3)
5%> @param dir direction (positive, negative) or number (1, -1)
10%> vec =
axisdir2vec(
"x",
"positive") % returns [1, 0, 0]
14%> %> @copyright see the file @ref LICENSE in the root directory of the repository
15% =========================================================================== %
19if ischar(axis) || isstring(axis)
21elseif ~isnumeric(axis)
22 error(
"The axis must be a number or a string")
26if ischar(dir) || isstring(dir)
29 error("The direction must be a number or a
string")
function axis2num(in axis)
convert an axis to a number
function axisdir2vec(in axis, in dir)
convert an axis and a direction to a vector
function direction2num(in dir)
convert a direction to a number