Syntax: tofloat(inputdata [, minval = VAL] [, maxval = VAL])
tofloat() converts numeric data to floating-point format (in the range 0.0 - 1.0), while preserving the scale of the input data. That is, if the input data is of type byte, then values which were 0 in the input become 0.0 in the output, values which were 255 in the input become 1.0 in the output, and other values are scaled appropriately between them. This is true of all integer types supports by DaVinci.
If the input data uses a different range (for example, it is represented using the data type short, but is from a 12-bit source, so the maximum value is 4096), the input minimum and maximum values can be specified using the optional minval and maxval parameters.
This function will accept float and double input as well, although for those data types no actual change will take place (other than type conversion) unless minval and maxvalare specified. This is to allow the function to be used without encountering errors when the data type is not actually known (e.g. by a function which can accept any type of numeric data).