How can I rotate an object smoothly using sin or cos?
Following solution might work for you (if I understand the requirement correctly) ...


Create a maxRot (int) property on the object.
Create an always sensor on the object that points to following python code



import bge
from bge import logic

cont = logic.getCurrentController()
own = cont.owner

if (own['maxRot']&gt;0):
    own.applyRotation ((0, 0, 0.0174533), True)
    own['maxRot'] -= 1




Create an keyboard sensor (right arrow) on the object that points to following python code ...



import bge
from bge import logic

cont = logic.getCurrentController()
own = cont.owner
own['maxRot'] += 36



Run play and click the right arrow.

[0.0174533 = 1 deg in radians]