<repo_name>kap256/CookieTools<file_sep>/test.js


function rawFormatter(val) { return Math.round(val * 1000) / 1000; }

var formatLong = [' thousand', ' million', ' billion', ' trillion', ' quadrillion', ' quintillion', ' sextillion', ' septillion', ' octillion', ' nonillion'];
var prefixes = ['', 'un', 'duo', 'tre', 'quattuor', 'quin', 'sex', 'septen', 'octo', 'novem'];
var suffixes = ['decillion', 'vigintillion', 'trigintillion', 'quadragintillion', 'quinquagintillion', 'sexagintillion', 'septuagintillion', 'octogintillion', 'nonagintillion'];
for (var i in suffixes) {
	for (var ii in prefixes) {
		formatLong.push(' ' + prefixes[ii] + suffixes[i]);
	}
}

var formatShort = ['k', 'M', 'B', 'T', 'Qa', 'Qi', 'Sx', 'Sp', 'Oc', 'No'];
var prefixes = ['', 'Un', 'Do', 'Tr', 'Qa', 'Qi', 'Sx', 'Sp', 'Oc', 'No'];
var suffixes = ['D', 'V', 'T', 'Qa', 'Qi', 'Sx', 'Sp', 'O', 'N'];
for (var i in suffixes) {
	for (var ii in prefixes) {
		formatShort.push(' ' + prefixes[ii] + suffixes[i]);
	}
}
formatShort[10] = 'Dc';

function formatEveryThirdPower(notations) {
	return function (val) {
		var base = 0, notationValue = '';
		if (!isFinite(val)) return 'Infinity';
		if (val >= 1000000) {
			val /= 1000;
			while (Math.round(val) >= 1000) {
				val /= 1000;
				base++;
			}
			if (base >= notations.length) { return 'Infinity'; } else { notationValue = notations[base]; }
		}
		return (Math.round(val * 1000) / 1000) + notationValue;
	};
}<file_sep>/README.md
# 好みの問題
CookieToolsの恒河沙以降の表記を好みにあわせたかっただけなのです。

# CookieTools
CookieClicker extension tools
https://github.com/hideki0403/CookieTools

