mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Only preserve angle in Point#normalize() if direction doesn't change.
This commit is contained in:
parent
86e4d2a6b9
commit
e54691214a
1 changed files with 2 additions and 1 deletions
|
@ -515,7 +515,8 @@ var Point = Base.extend(/** @lends Point# */{
|
|||
scale = current !== 0 ? length / current : 0,
|
||||
point = new Point(this.x * scale, this.y * scale);
|
||||
// Preserve angle.
|
||||
point._angle = this._angle;
|
||||
if (scale >= 0)
|
||||
point._angle = this._angle;
|
||||
return point;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue