This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function roundFloats(listOfFloats) { | |
var tempArr, | |
arraySum, | |
lowerSum, | |
largestFraction, | |
i; | |
// lowerSum will be the sum of all floats Math.floored | |
lowerSum = 0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generate a unique ID | |
* | |
* @param {Number} [len=15] - Optionally set a length of the generated string. | |
* Defaults to 15 characters, it's not recommended | |
* to go much lower than this in order to ensure | |
* uniqueness. | |
* | |
* @return {string} A unique ID. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. | |
"node" : true, |
NewerOlder