function floatScalar(val) {
      if (typeof val === 'number') {
        return val;
      } else if (typeof val === 'boolean') {
        return val ? 1 : 0;
      } else if (typeof val === 'string') {
        return parseFloat(val);
      } else if (val instanceof Char) {
        return val.code;
      }
    }
Converts the passed parameter to the function to its boolean value.
It will return an array of booleans if an array is passed in.

@param {int, byte, string} what          the parameter to be converted to boolean
@param {int[], byte[], string[]} what    the array to be converted to boolean

@return {boolean|boolean[]} retrurns a boolean or an array of booleans