From ccd0bf8f6b0cb3cea891e5cee85f77da917c2a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 17 Jun 2013 08:28:37 -0700 Subject: [PATCH] Simply delegate to Point#getLength() as we already have it. --- src/basic/Line.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/basic/Line.js b/src/basic/Line.js index 6c14b27c..2f1ea264 100644 --- a/src/basic/Line.js +++ b/src/basic/Line.js @@ -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(); }, /**