Skip to content

Commit a8e58b5

Browse files
committed
Merge pull request #8 from shakiba/patch-1
fix missing T_VECTORS.push()
2 parents ec00187 + b98d748 commit a8e58b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SAT.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@
669669
var differenceV = T_VECTORS.pop().copy(p).sub(c['pos']);
670670
var radiusSq = c['r'] * c['r'];
671671
var distanceSq = differenceV.len2();
672+
T_VECTORS.push(differenceV);
672673
// If the distance between is smaller than the radius then the point is inside the circle.
673674
return distanceSq <= radiusSq;
674675
}
@@ -930,4 +931,4 @@
930931
SAT['testPolygonPolygon'] = testPolygonPolygon;
931932

932933
return SAT;
933-
}));
934+
}));

0 commit comments

Comments
 (0)