mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Revert to version without optional digits, for speed reasons.
Since we don't actually use the other version anywhere.
This commit is contained in:
parent
aa35226916
commit
1fad063a30
1 changed files with 2 additions and 4 deletions
|
@ -199,11 +199,9 @@ this.Base = Base.inject(/** @lends Base# */{
|
|||
* up to the amount of fractional digits.
|
||||
*
|
||||
* @param {Number} num the number to be converted to a string
|
||||
* @param {Number} [digits=5] the maximum maount of fraction digits
|
||||
*/
|
||||
formatNumber: function(num, digits) {
|
||||
var factor = Math.pow(10, digits | 5);
|
||||
return (Math.round(num * factor) / factor).toString();
|
||||
formatNumber: function(num) {
|
||||
return (Math.round(num * 100000) / 100000).toString();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue