floatv(var x): var

Returns x converted to a 32 bit IEEE floating point value. Handy for assigning floating point values to var variables for vertex shaders and matrices.

Parameters:

x - any var.

Returns:

x converted to a 32 bit IEEE floating point value, but still with type var.

Speed:

Fast

Remarks:

Example:

mtl_bump.skill1 = floatv(time_step); // pass the time_step variable to a material effect 

See also:

floatr, floatd , fixv

► latest version online