Open MaxEden opened 11 years ago
Yes - looks leftover from previous implementation that didn't get cleaned up. There are couple more occurrences that need to be addressed in this: https://github.com/nikhilk/scriptsharp/blob/cc/src/Core/Scripts/Runtime/Format.js
I will get to them, or feel free to change and submit a pull request, and I'll merge.
ss.js
_formatters['Number'] = function(number, format, culture) { ... case 'p': case 'P': if (precision == -1) { precision = nf.perDD; } s = (Math.abs(number) * 100.0).toFixed(precision).toString(); if (precision && (nf.perDS != '.')) { var index = s.indexOf('.'); s = s.substr(0, index) + nf.perDS + s.substr(index + 1); } s = _commaFormatNumber(s, nf.perGW, nf.perDS, nf.perGS); if (number < 0) { s = String.format(culture, nf.perNP, s); } else { s = String.format(culture, nf.perPP, s); } break;
Possibly there should be ss.format