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
Show hidden characters
{ | |
// Refs: | |
// - https://www.sublimetext.com/docs/3/color_schemes.html | |
// - https://github.com/twolfson/sublime-files/blob/master/Packages/Color%20Scheme%20-%20Default/Mariana.sublime-color-scheme | |
"variables": { | |
// "black": "hsl(0, 0%, 0%)", | |
// "blue": "hsl(210, 50%, 60%)", | |
// "blue2": "hsl(209, 13%, 35%)", | |
// "blue3": "hsl(210, 15%, 24%)", | |
// "blue4": "hsl(210, 13%, 45%)", |
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 bigRound(num, prcn) { | |
if (num < 1000) { | |
return num; | |
}; | |
var rndup = 0.000001; | |
var sfxs = ['k', 'M', 'B', 'T', 'Q']; | |
var expt = Math.floor(Math.log(num) / Math.LN10 + rndup); | |
var sfx = sfxs[Math.floor(expt / 3) - 1]; | |
var clip = +(num * 1.0 / Math.pow(10, expt - expt % 3)).toPrecision(prcn || 2); | |
return clip + sfx; |