Remove hidden unused squared argument in Point#getLength()

This commit is contained in:
Jürg Lehni 2013-12-28 20:58:16 +01:00
parent 38d67d843d
commit 8711fcf500

View file

@ -467,11 +467,7 @@ var Point = Base.extend(/** @lends Point# */{
* @bean
*/
getLength: function() {
// Supports a hidden parameter 'squared', which controls whether the
// squared length should be returned. Hide it so it produces a bean
// property called #length.
var length = this.x * this.x + this.y * this.y;
return arguments.length && arguments[0] ? length : Math.sqrt(length);
return Math.sqrt(this.x * this.x + this.y * this.y);
},
setLength: function(length) {