mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -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
|
* @bean
|
||||||
*/
|
*/
|
||||||
getLength: function() {
|
getLength: function() {
|
||||||
// Supports a hidden parameter 'squared', which controls whether the
|
return Math.sqrt(this.x * this.x + this.y * this.y);
|
||||||
// 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);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setLength: function(length) {
|
setLength: function(length) {
|
||||||
|
|
Loading…
Reference in a new issue