mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -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
|
* @type Number
|
||||||
*/
|
*/
|
||||||
getLength: function() {
|
getLength: function() {
|
||||||
var v = this.getVector();
|
return this.getVector().getLength();
|
||||||
return Math.sqrt(v.x * v.x + v.y * v.y);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue