Improve performance of Path.Line() constructor.

Passing an array is much faster than using arguments directly.
This commit is contained in:
Jürg Lehni 2014-02-26 14:55:43 +01:00
parent bf50bd649a
commit 49801e4b8b

View file

@ -73,10 +73,10 @@ Path.inject({ statics: new function() {
* });
*/
Line: function(/* from, to */) {
return new Path(
return new Path([
Point.readNamed(arguments, 'from'),
Point.readNamed(arguments, 'to')
).set(Base.getNamed(arguments));
]).set(Base.getNamed(arguments));
},
/**