mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Apply @hkrish's fix in 3781aedb22
to Line.getSignedDistance as well.
Relates to #554
This commit is contained in:
parent
3781aedb22
commit
f0f98daf69
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ var Line = Base.extend(/** @lends Line# */{
|
|||
vy -= py;
|
||||
}
|
||||
return Numerical.isZero(vx)
|
||||
? vy >= 0 ? py - x : x - px
|
||||
? vy >= 0 ? px - x : x - px
|
||||
: Numerical.isZero(vy)
|
||||
? vx >= 0 ? y - py : py - y
|
||||
: -(vy * x - vx * y - px * (py + vy) + py * (px + vx)) /
|
||||
|
|
Loading…
Reference in a new issue