Improve performance (parametric types)

The functions create_rotation_matrix and angle2dcm were changed to
parametric functions to improve the performance.

Additionally, the type EulerAngles is also parametric now.