Apply @hkrish's fix in 3781aedb22 to Line.getSignedDistance as well.

Relates to #554
This commit is contained in:
Jürg Lehni 2015-01-04 00:53:56 +01:00
parent 3781aedb22
commit f0f98daf69

View file

@ -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)) /