mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix Line#getSide() imprecisions when points are on the line.
This commit is contained in:
parent
6a4347e75b
commit
b40efbf6db
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ var Line = Base.extend(/** @lends Line# */{
|
|||
v2y = y - py,
|
||||
// ccw = v2.cross(v1);
|
||||
ccw = v2x * vy - v2y * vx;
|
||||
if (ccw === 0 && !isInfinite) {
|
||||
if (!isInfinite && Numerical.isZero(ccw)) {
|
||||
// If the point is on the infinite line, check if it's on the
|
||||
// finite line too: Project v2 onto v1 and determine ccw based
|
||||
// on which side of the finite line the point lies. Calculate
|
||||
|
|
Loading…
Reference in a new issue