Advertisement
cloudy352

IGM custom short number script 1

Apr 17th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // The nicest number display system ever.
  2. // This display system is a reference to a web animation I watch. Can you find out which?
  3. nums = ['somewhat nice',
  4.         'quite nice',
  5.         'still nice',
  6.         'nice',
  7.         'actually nice',
  8.         'legitimately nice',
  9.         'really nice',
  10.         'good guy Greg nice',
  11.         'so nice',
  12.         'very nice',
  13.         'so so nice',
  14.         'so so so nice',
  15.         'so so so so nice',
  16.         'okay enough with the so\'s nice',
  17.         'very very nice',
  18.         'very very very nice',
  19.         'uh-oh here we go again nice',
  20.         'extremely nice',
  21.         '99th percentile of nice',
  22.         'super-duper nice',
  23.         'like OMG nice',
  24.         'like ZOMG nice',
  25.         'like OMFG nice',
  26.         'like ZOMFG nice',
  27.         'like would you stop it already nice',
  28.         '99.9th percentile of nice',
  29.         'so nice it rhymes with rice',
  30.         'the most nice ever',
  31.         'not nice (Okay, JK)',
  32.         'astronomically nice',
  33.         'so nice you would give up Dream Island (not really. Of course you wouldn\'t)',
  34.         'so nice you can\'t be human',
  35.         'so nice you must have lice',
  36.         '99.99th percentile of nice',
  37.         'jaw-droppingly nice',
  38.         'jaw-repairingly nice',
  39.         'shockingly nice (which under the circumstances GLaDOS has been)',
  40.         'nice-nice',
  41.         'around the halfway in the scale of niceness (actually not really b/c it\'s logarithmic)',
  42.         '99.999th percentile of nice',
  43.         'nice, as in the the fifth most populous city in France',
  44.         'amazingly nice',
  45.         'niiiiiiiice!',
  46.         'fantastically nice',
  47.         'knee ice (Say it fast enough and it sounds like nice)',
  48.         'goodly nice',
  49.         'exhilaratingly nice',
  50.         'so nice it\'s scary',
  51.         'dice',
  52.         'barely believably nice',
  53.         'unbelievably nice',
  54.         'excruciatingly nice',
  55.         'mind-numbingly nice',
  56.         'mind-bogglingly nice',
  57.         'anger-inducing nice',
  58.         'fury-inducing nice',
  59.         'insanity-inducing nice',
  60.         'riot-causing nice',
  61.         'killing-causing from nice',
  62.         'mass-murder resulting from nice',
  63.         'war-causing nice',
  64.         'World War III-causingly-nice',
  65.         'apocalypsely nice',
  66.         'world-self-destructionly-nice',
  67.         'galactic-impolsion-inducingly nice',
  68.         'universe-explodingly nice',
  69.         'reality-endingly nice',
  70.         'lowest non-descriptive level',
  71.         'highest lower-68 level (of nice)',
  72.         'lowest upper-six level',
  73.         'highest non-sub-Leafy level',
  74.         'sub-sub Leafy level',
  75.         'sub-Leafy level',
  76.         'super-sub-Leafy level',
  77.         'Leafy\'s level of niceness'
  78.         ];
  79.  
  80. function Beautify(num,floats)
  81. {
  82. if (!isFinite(num)) return 'Infinity';
  83. if(num < 10 || num >= parseFloat('1e' + (nums.length+1))) return Math.round(num);
  84. var i = 0;
  85. while(num >= 10)
  86. {
  87. num/=10;
  88. i++;
  89. }
  90. num = Math.round(num*1000000)/1000000;
  91. if(num>=10)
  92. {
  93. num/=10;
  94. i++;
  95. num = Math.round(num*1000000)/1000000;
  96. } //deals with rounding errors
  97. if(i > nums.length) return Math.round(num);
  98. num = num.toFixed(6);
  99. return num + ' ' +nums[i - 1];
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement