Rotation using exponential functions

I am trying to make rotation using exponential functions, but an error comes up telling me "cannot convert ‘double’ to ‘float’ "

My code:

transform.Rotate (0, 0, Math.Exp( - touch0.position.x - rotationRate));
where touch0.position.x is the horizontal position of where the touch is, and rotationRate is the rotation speed.

Hey there,

what you are missing are a few f behind numbers to specify that you are handling floats here:

transform.Rotate (0f, 0f, Math.Exp( - touch0.position.x - rotationRate));

That should work.