mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Use Base.pick() instead of null check.
This commit is contained in:
parent
60c64ab25c
commit
6c0faaf010
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ var Formatter = Base.extend(/** @lends Formatter# */{
|
||||||
* @param {Number} [precision=5] the amount of fractional digits
|
* @param {Number} [precision=5] the amount of fractional digits
|
||||||
*/
|
*/
|
||||||
initialize: function(precision) {
|
initialize: function(precision) {
|
||||||
this.precision = precision == null ? 5 : precision;
|
this.precision = Base.pick(precision, 5);
|
||||||
this.multiplier = Math.pow(10, this.precision);
|
this.multiplier = Math.pow(10, this.precision);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue