A question rises…

I know two ways to rotate an object(see below). Which one is better/faster to use?

Use math module to convert to radians and the to_matrix or manual calculation without the module and set the orientation directly?

With the math module:

```
def math_rotate(cont):
import math
# <-----
own = cont.owner
rot_step_degree = 5.0
rotation_radians = own.worldOrientation.to_euler()
rotation_radians[2] += math.radians(rot_step_degree)
matrix = rotation_radians.to_matrix()
own.worldOrientation = matrix
```

Manual calculation:

```
def rotate(cont):
# ----->
own = cont.owner
rot_step_degree = -5.0
rotation_radians = own.worldOrientation.to_euler()
degrees = radians_to_degrees(rotation_radians[2])
radians = degrees_to_radians(degrees + rot_step_degree)
own.worldOrientation = [0,0,radians]
def radians_to_degrees(radians):
pi = 3.141592653589793
degrees = radians / (pi / 180)
return degrees
def degrees_to_radians(degrees):
pi = 3.141592653589793
radians = degrees * (pi / 180)
return radians
```

Both do the exact same thing, and both returning the same calculations(well manual is a bit more precise).

Who knows the answer to my question?