mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Simply delegate to Point#getLength() as we already have it.
This commit is contained in:
parent
9463f0078a
commit
ccd0bf8f6b
1 changed files with 1 additions and 2 deletions
|
@ -72,8 +72,7 @@ var Line = Base.extend(/** @lends Line# */{
|
|||
* @type Number
|
||||
*/
|
||||
getLength: function() {
|
||||
var v = this.getVector();
|
||||
return Math.sqrt(v.x * v.x + v.y * v.y);
|
||||
return this.getVector().getLength();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue