mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Remove hidden unused squared argument in Point#getLength()
This commit is contained in:
parent
38d67d843d
commit
8711fcf500
1 changed files with 1 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue