Change the interface of rotMat3d
It would be better to change how the user chooses whether the given angle values are in radians or degrees. Since this is a binary problem, a boolean [logical] type variable would be more appropriate and make the checks much easier.
So the proposed change is to change the radDeg
variable to a deg
logical/boolean/binary variable that will declare whether the angles are given in degrees. If not, then radians can safely be assumed.
Edited by Achilles Kappis