I suggest linking to     https://en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions    and pointing out that this function will compute the correct matrices for rotation along individual axes in the same way that is described for 3D in that page. 