Convert "Double" to "Float" or "Int"?

I searched around but nothing useful came. Just some help about javascript (about parseFloat), but I’m using C# and it does not seem to work.

I have a private double which I want to divide by 360 and then use as angle.
Problem is quaternions need floats, it doesn’t work with double.

Any help on how to achieve this?

Thanks in advance.

I do not use C# but you could try:

float variable = (float)yourDoubleVariable;

Edit: Information for other reader:

UnityScript allows to cast without any typecasting like

var aFloat:float;
var aInt:int;

aInt= aFloat;

will work and the conversion will simply truncate the result, not round so 1.9 becomes 1.

P.S:For those of you wondering how to use larger data than float in UnityScript you need to include the System.

var aDouble : System.Double;
var aBigInt : System.Int64;