Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The nicest number display system ever.
- // This display system is a reference to a web animation I watch. Can you find out which?
- nums = ['somewhat nice',
- 'quite nice',
- 'still nice',
- 'nice',
- 'actually nice',
- 'legitimately nice',
- 'really nice',
- 'good guy Greg nice',
- 'so nice',
- 'very nice',
- 'so so nice',
- 'so so so nice',
- 'so so so so nice',
- 'okay enough with the so\'s nice',
- 'very very nice',
- 'very very very nice',
- 'uh-oh here we go again nice',
- 'extremely nice',
- '99th percentile of nice',
- 'super-duper nice',
- 'like OMG nice',
- 'like ZOMG nice',
- 'like OMFG nice',
- 'like ZOMFG nice',
- 'like would you stop it already nice',
- '99.9th percentile of nice',
- 'so nice it rhymes with rice',
- 'the most nice ever',
- 'not nice (Okay, JK)',
- 'astronomically nice',
- 'so nice you would give up Dream Island (not really. Of course you wouldn\'t)',
- 'so nice you can\'t be human',
- 'so nice you must have lice',
- '99.99th percentile of nice',
- 'jaw-droppingly nice',
- 'jaw-repairingly nice',
- 'shockingly nice (which under the circumstances GLaDOS has been)',
- 'nice-nice',
- 'around the halfway in the scale of niceness (actually not really b/c it\'s logarithmic)',
- '99.999th percentile of nice',
- 'nice, as in the the fifth most populous city in France',
- 'amazingly nice',
- 'niiiiiiiice!',
- 'fantastically nice',
- 'knee ice (Say it fast enough and it sounds like nice)',
- 'goodly nice',
- 'exhilaratingly nice',
- 'so nice it\'s scary',
- 'dice',
- 'barely believably nice',
- 'unbelievably nice',
- 'excruciatingly nice',
- 'mind-numbingly nice',
- 'mind-bogglingly nice',
- 'anger-inducing nice',
- 'fury-inducing nice',
- 'insanity-inducing nice',
- 'riot-causing nice',
- 'killing-causing from nice',
- 'mass-murder resulting from nice',
- 'war-causing nice',
- 'World War III-causingly-nice',
- 'apocalypsely nice',
- 'world-self-destructionly-nice',
- 'galactic-impolsion-inducingly nice',
- 'universe-explodingly nice',
- 'reality-endingly nice',
- 'lowest non-descriptive level',
- 'highest lower-68 level (of nice)',
- 'lowest upper-six level',
- 'highest non-sub-Leafy level',
- 'sub-sub Leafy level',
- 'sub-Leafy level',
- 'super-sub-Leafy level',
- 'Leafy\'s level of niceness'
- ];
- function Beautify(num,floats)
- {
- if (!isFinite(num)) return 'Infinity';
- if(num < 10 || num >= parseFloat('1e' + (nums.length+1))) return Math.round(num);
- var i = 0;
- while(num >= 10)
- {
- num/=10;
- i++;
- }
- num = Math.round(num*1000000)/1000000;
- if(num>=10)
- {
- num/=10;
- i++;
- num = Math.round(num*1000000)/1000000;
- } //deals with rounding errors
- if(i > nums.length) return Math.round(num);
- num = num.toFixed(6);
- return num + ' ' +nums[i - 1];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement