function floatScalar(val) {
      if (typeof val === 'number') {
        return val;
      }
      if (typeof val === 'boolean') {
        return val ? 1 : 0;
      }
      if (typeof val === 'string') {
        return parseFloat(val);
      }
      if (val instanceof Char) {
        return val.code;
      }
    }
// decimal will work because JS converts those to int.
decimal will work because JS converts those to int.
decimal will work because JS converts those to int .
function floatScalar(val) {
      if (typeof val === 'number') {
        return val;
      }
      if (typeof val === 'boolean') {
        return val ? 1 : 0;
      }
      if (typeof val === 'string') {
        return parseFloat(val);
      }
      if (val instanceof Char) {
        return val.code;
      }
    }
function floatScalar ( val ) { if ( typeof val === 'number' ) { return val ; } if ( typeof val === 'boolean' ) { return val ? 1 : 0 ; } if ( typeof val === 'string' ) { return parseFloat ( val ) ; } if ( val instanceof Char ) { return val . code ; } }
decimal will work because JS converts those to int.
decimal will work because JS converts those to int .