src/hft/scripts/misc/logger.js
function(args) {
    var lastArgWasNumber = false;
    var numArgs = args.length;
    var strs = [];
    for (var ii = 0; ii < numArgs; ++ii) {
      var arg = args[ii];
      if (arg === undefined) {
        strs.push('undefined');
      } else if (typeof arg === 'number') {
        if (lastArgWasNumber) {
          strs.push(", ");
        }
        if (arg === Math.floor(arg)) {
          strs.push(arg.toFixed(0));
        } else {
        strs.push(arg.toFixed(3));
        }
        lastArgWasNumber = true;
      } else if (window.Float32Array && arg instanceof Float32Array) {
        // TODO(gman): Make this handle other types of arrays.
        strs.push(tdl.string.argsToString(arg));
      } else {
        strs.push(arg.toString());
        lastArgWasNumber = false;
      }
    }
    return strs.join("");
  }
function(args) {
    var lastArgWasNumber = false;
    var numArgs = args.length;
    var strs = [];
    for (var ii = 0; ii < numArgs; ++ii) {
      var arg = args[ii];
      if (arg === undefined) {
        strs.push('undefined');
      } else if (typeof arg === 'number') {
        if (lastArgWasNumber) {
          strs.push(", ");
        }
        if (arg === Math.floor(arg)) {
          strs.push(arg.toFixed(0));
        } else {
        strs.push(arg.toFixed(3));
        }
        lastArgWasNumber = true;
      } else if (window.Float32Array && arg instanceof Float32Array) {
        // TODO(gman): Make this handle other types of arrays.
        strs.push(tdl.string.argsToString(arg));
      } else {
        strs.push(arg.toString());
        lastArgWasNumber = false;
      }
    }
    return strs.join("");
  }
function ( args ) { var lastArgWasNumber = false ; var numArgs = args . length ; var strs = [ ] ; for ( var ii = 0 ; ii < numArgs ; ++ ii ) { var arg = args [ ii ] ; if ( arg === undefined ) { strs . push ( 'undefined' ) ; } else if ( typeof arg === 'number' ) { if ( lastArgWasNumber ) { strs . push ( ", " ) ; } if ( arg === Math . floor ( arg ) ) { strs . push ( arg . toFixed ( 0 ) ) ; } else { strs . push ( arg . toFixed ( 3 ) ) ; } lastArgWasNumber = true ; } else if ( window . Float32Array && arg instanceof Float32Array ) { // TODO(gman): Make this handle other types of arrays. strs . push ( tdl . string . argsToString ( arg ) ) ; } else { strs . push ( arg . toString ( ) ) ; lastArgWasNumber = false ; } } return strs . join ( "" ) ; }
FIX! or move to strings.js
FIX! or move to strings . js