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:
- floatv() replaces the C-Script float() function.
- In lite-C a var is automatically converted when assigned to a
float variable, but this function is still useful if a var variable is to
be interpreted as a float (as in matrix skills used for shaders).
Example:
mtl_bump.skill1 = floatv(time_step); // pass the time_step variable to a material effect
See also:
floatr, floatd , fixv
► latest
version online